Welcome Guest, Not a member yet? Register   Sign In
Nested MVC
#31

[eluser]BizComputing[/eluser]
Have a busy day today, but let me take a look at my Loader extension class. It's working fine but I need to see if there's any proprietary stuff in there before I make it public.
#32

[eluser]Edemilson Lima[/eluser]
I think a good Loader extension must be simple and generic, with no restrictive things like the need for a submit() method, for example. Better if it allow us to call any method we want. It must be simple, to fit in any application. Also it could always return any loaded module result as a string.

I hope you can release your extension for us. Thank you in advance!
#33

[eluser]BizComputing[/eluser]
Code is available for just the Loader extension. It is under bizLoader on the wiki. Hopefully the documentation embedded in the code should be sufficient.

Yes, the Loader extension is simple and generic. When I mentioned my submit() and index() methods, I was talking about my module base class. The Loader module method only makes 4 changes over loading just a library.

1. It expects your module to be in your <application>/modules folder.
2. It auto loads (but not instantiate) <application>/libraries/module.php in expectation that modules all extend the common class defined in module.php.
3. It does not look into CI's system directories if not found in your application folders.
4. It has the ability to load but not instantiate the supplied module.

This extension was written to support my applications and as such may not be useful to anyone else. If you find ways to improve the code, I'ld love to hear about it.

This extension is licensed via MIT license. Hopefully that provides the most flexibility in use of the code without my losing my copyright.
#34

[eluser]Edemilson Lima[/eluser]
It's awesome! I am studying and implementing it into my code.
When I go more deeper on it, I will post here my comments.
At this moment, thank you very very very much! :-)

PS: does your name have something related to Jimi Hendrix?
#35

[eluser]BizComputing[/eluser]
Smile on Jimi Hendrix, my parents were clueless about pop culture at the time I was born. So, I have lived with Purple Haze.

Don't think the entertainment industry is ready for a rockin Jimi Hendrix playing a clarinet.
#36

[eluser]Edemilson Lima[/eluser]
Today the entertainment industry only have these "canned" singers, no more real and natural talented singers/composers/gurus/masters from the old days...

Do you play clarinet? I would like to play anything, but playing an instrument is not my beach...
#37

[eluser]BizComputing[/eluser]
Actually, you may want to go back to the wiki. I added my module superclass in the same wiki post below the loader.

As you can see, it's really just a documented set of methods for structuring my modules to operate in a consistent manner. There's nothing stopping you from implementing a totally different module superclass, this is just what is currently working for me. I can actually see a future where I may have a handful of different module superclasses, and at that point I would expand on my loader class to provide the name of the superclass as an argument.

The real key thing on my module class is the structuring and the constructor which ensures every module has a reference to the hosting controller.
#38

[eluser]BizComputing[/eluser]
I played Clarinet for 9 years, the last 3 in a full orchestra. I haven't touched my Clarinet now in 20+ years. I own a really nice Charles Walters piano since my daughter plays, but, sadly I can only plunk out little cheezy ditties cause I don't have the time to properly learn how to play.

That will be my retirement goal, to become a concert skilled pianist, at least it's something to dream about.
#39

[eluser]codex[/eluser]
Hi Jim,

thanks for the lib. I'm running into a bit of trouble though. I suppose you should autoload this lib simply by adding 'biz_loader' to the array, right?

I'm getting 'Unable to load the requested class: biz_loader'. I guess I'm doing something wrong, but what?
#40

[eluser]BizComputing[/eluser]
Nope, you just need to make sure your config'd prefix is biz instead of my, either that, rename the class to my_loader.

Loader is automatically a part of the standard controller.

One caveat, I have not attempted to use my loader in a PHP 4 environment.




Theme © iAndrew 2016 - Forum software by © MyBB