Code Clips / Snipets

Good night everyone!

On my application I have a lot of recurrent code. Where can I put then together to reuse when I need?

Create a new component and call this when I need?

Create a lot of widgets?

Create a lot of extensions?

Create widgets clips?

It depends on what your code is.

If is a part of page (with html) you can try to generalize the code and wirte a widget. Like, for example, CLinkPager.

If is only php code that do some task you can try to generalize this task and create a component (like, for example, CPagination).

If your code are several page that are always the same in many projects, you can do a module (like user module).

Tanks dude. I was thinking about this ether.

:)