![]() |
Module support? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Feature Requests (https://forum.codeigniter.com/forumdisplay.php?fid=29) +--- Thread: Module support? (/showthread.php?tid=61284) |
RE: Module support? - dmyers - 04-10-2015 (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 ) 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 RE: Module support? - sintakonte - 04-12-2015 (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. 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 RE: Module support? - wolfgang1983 - 04-12-2015 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 RE: Module support? - michalsn - 04-12-2015 HMVC - no. Modules - yes. RE: Module support? - Davcon - 04-12-2015 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 RE: Module support? - nasser.man - 05-04-2015 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, RE: Module support? - apsweb - 05-14-2015 Yes this would be a great also if it could work side by side with existing MVC. just my opinion RE: Module support? - RWCH - 06-05-2015 [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. RE: Module support? - nasser.man - 06-05-2015 (06-05-2015, 07:42 AM)RWCH Wrote: [quote pid='316351' dateline='1428842314'] ... 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. RE: Module support? - InsiteFX - 06-06-2015 I have to agree with David above on what he said 100% |