Poll: CI4: Module support?
You do not have permission to vote in this poll.
yes
88.46%
115 88.46%
no
4.62%
6 4.62%
maybe
6.92%
9 6.92%
Total 130 vote(s) 100%
* You voted for this item. [Show Results]

  • 7 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module support?

#11
(04-10-2015, 04:23 PM)no1youknowz Wrote:
(04-10-2015, 11:27 AM)dmyers Wrote: I also think allowing multiple sub folders under the controllers would also be great ( /admin/configure/installed/tooltips for example )

Like I said.  It's already available.  Been that way for years.  I have that.  

/tracking/admin/modules/add/test  <-- like that





(04-10-2015, 11:27 AM)dmyers Wrote: What I don't like is controllers calling other controllers? Never got that? If you need to call "shared" code then put it in a library?

Exactly!  Big Grin

I guess I've been using my modified router (which can load controllers from packages) for so long I didn't realize they made the change! Now if they would support controllers in packages I could remove a bunch more of my code!

My 2 biggest wants for version 4 are CodeIgniter Packages which have ALL application folders (config, controllers, libraries, helpers, views, languages) and autoloading those package files based on the PHP include_path. stream_resolve_include_path() does wonders in that department! (not $foo = new bar() auto loading thou) just path searching using the include path. I don't mind the singletons and service locator pattern of ci()->load->library('mylib');

DMyers
Reply

#12
(04-10-2015, 06:51 AM)no1youknowz Wrote: It's quite simple.  If you have to use HMVC to solve whatever problem you are trying to.  Then you just don't know how to design and develop an application.

My answer is no.  There is no need for HMVC.  I have an enterprise application.  It's actually 4 distinct applications built with 1 common middle-ware.  I looked at HMVC in the beginning and laughed.  There was no need.  Actually, it would have complicated things.

Are you high?  A controller which then would hit a model and view and then hit another controller elsewhere?  Yeah, kinda smells like you don't know how to code.

nice speech!

i use it anyway because of the fact of the clean encapsulation
In our own B2B shop solution without being able to create widgets (modules) we would suffer to much

i think its mandatory for a future version of CI to implement this as a built-in feature

and no i'm not high
Reply

#13
I think HMVC is perfect for codeigniter.

1: When you create modules you can work on one while developer works on another.
2: If creating online shop HMVC is good for widgets. Like what open cart has but open cart is oop I think.

But also be able to have the option to enable or disable HMVC in config that way if users do not want to use it then can turn it off.

The other thing I would like is for the router in default controller to be able to handle sub folders.

This only able to do with HMVC
$route['default_controller'] = 'catalog/common/welcome/index';

I use to be able to use subfolders in default controller in codeigniter 2 + but they seem to have removed that feature in codeigniter 3
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply

#14
HMVC - no.
Modules - yes.
Reply

#15
Hi,

David Connelly here, from Inside Club dot org. I just want to add my voice to those who support modules - particularly the HMVC way of doing things.

I can tell you that over the years I have successfully built and sold at least 300 HMVC based websites. Right now I'm finishing off an app for a call centre which was build entirely in Codeigniter, HMVC. What I can tell you is that the clients absolutely LOVE that way of doing things. The reason why they are so happy is because:

* Glitches are usually self contained within modules and can be fixed easily and quickly.

* Bolting extra parts onto systems is super easy.

* Multiple web developers can collaborate harmoniously without stepping on each others' toes.

In the past I've built sites which are not modular and my experience is that they eventually fall apart like a house of cards, once you start stacking too many features onto them. An example is the car manufacturer Saab. In 2005 I built a PHP system which helped them to process manufacturing and ordering of vehicles. It was a cool system at first and everyone was happy. However, as time went on and more and more features got added, it started to fall apart at the seams. Every time they asked me for a new feature I was full of dread. Eventually it became a nightmare for everyone involved.

Thanks to HMVC that has all changed. You can just stack tonnes and tonnes of features on, safe in the knowledge that it will never break. Structurally, I'm convinced that it's the best way to build web apps.

For what it's worth, the one other thing I would urge is to please do NOT take Codeigniter down the same road as Laravel. Laravel is only a few years old and already they're talking about version 6. I think that the whole Laravel community is currently immersed in an aggressive rewrite culture and I know for a fact that clients cannot stand that kind of thing. The clients I'm dealing with - some of whom are paying me six figure sums for web apps - wouldn't touch Laravel with a barge pole. The reason why they wouldn't touch it is because they don't want their application to be out of date after six months. So please, let the new versions of Codeigniter come out slowly and with concern for the clients who are potentially going to be stuck with old versions. Please do not make Codeigniter a "me too " framework.

Okay, I'm done. Sorry for waffling.

-DC
Reply

#16
i think i need to pack my application in separated modules and reuse them and share with my developer team, WireDesignz extension add HMVC to CI but i can not wait for HMVC/Module in CI4,
ressan.ir
CI is nice Heart
Reply

#17
Yes this would be a great also if it could work side by side with existing MVC. just my opinion
Reply

#18
[quote pid='316351' dateline='1428842314']

"The reason why they wouldn't touch it is because they don't want their application to be out of date after six months."

AND

"So please, let the new versions of Codeigniter come out slowly and with concern for the clients who are potentially going to be stuck with old versions."
[/quote]

AMEN!!! Couldn't agree more...

And I also agree on the HMVC part.

I wonder if people actually have used HMVC. It can be very useful for almost everybody. Let's take a simple example...

We need to have a main menu and we need it in almost all of our pages. Where do you create this menu? For sure not in every view. I certainly hope not. So when creating your page you want to insert the 'menu view'. This view has nothing to do with the content of the rest of your page. Where do you fill it with the required data? In some model I hope, which you call from some controller. And what controller would that be? Your own base controller (my_controller), because you need this view in almost every page? And you use a base model for it? Right? Wrong!

Yes, that is how I do it now in CodeIgniter and I do not like it a bit.
I would like to inject to my 'main menu' in a view as a separate component which it's own logic and data, and that is exactly what you can do with HMVC. The component has its own model and controller. Call the mainMenuController for its view and parse its output in your page. Voilá.

I really would like to know how I could do this better. Tell me...

How do you insert a main menu in your pages?
Where is the code?
How would that better be than the HMVC approach?

And NO, you do not use a library (or module) for your application specific main menu!!


Cheers. My € 0.02

R.
Reply

#19
(06-05-2015, 07:42 AM)RWCH Wrote: [quote pid='316351' dateline='1428842314']

"The reason why they wouldn't touch it is because they don't want their application to be out of date after six months."

AND

"So please, let the new versions of Codeigniter come out slowly and with concern for the clients who are potentially going to be stuck with old versions."


...

I really would like to know how I could do this better. Tell me...

...

[/quote]

I have a helper for main menu, i call generate_menu function in my template file, but! i think it is better that i have a complete separated widget (or module or any) as main menu, as footer and as header , ....
i fact i like create SITE Parts and then use them aside of main application,
HMVC is perfect for that.
ressan.ir
CI is nice Heart
Reply

#20
I have to agree with David above on what he said 100%
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.