Alex Tech Adventures The webs best tutorials!

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 12345678...10
TOPIC: Modular application
#32
Re:Modular application 2 Years, 5 Months ago Karma: 16
At the moment I do not have a set schedule and i work on videos as free time permits. Hopefully one day I will have a predictable timing.
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#35
Modular application 2 Years, 5 Months ago Karma: 0
Alex,
thanks for this great tutorial... looks like I´m finally getting around to use MVC Have been tinkering with ZF for a while now, but only "zending" it to my purpose, a.k.a. using the classes w/out MVC.

Anyway, with the now modular structure of the framework, I´m thinking it would be nicer to have all classes relating to a certain subject in one module directory. In other words, whatever is related to "book(s)" should be in the "library" directory (list, add, edit, delete and so on), with the permissions (guest, user, admin) set properly within the ACL. This way you could "export" your library module (and all others) to other projects requiring the library tasks, and just rewrite the default module accordingly suiting your new project. With the "add, edit and delete" actions stored in the "admin" directory, you´d have to search for the classes within all other directories in order to export the complete task.

Any thoughts on that?

Keep up the good work!

Cheers,
Joerg
Joerg
Fresh Boarder
Posts: 0
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#36
Re:Modular application 2 Years, 5 Months ago Karma: 16
Very interesting point. I see how the way its done now can be a problem in regard keeping things organized in terms of per feature (book management, user management) rather than per task (edit, delete, view). Personally, I believe both should be considered. I agree that searching for classes is a pain if, for example as you said, i want to extract my book module alone so others can include it in their application. But while i do that, I also do not want all classes to be all disorganized and not categorized by their tasks. If the module is big then dealing with separate tasks could become a management issue. Furthermore, an admin module is a rather common aspect of web applications (or so i've noticed). I am sure they would welcome a "plugin" that would fit into their existing scheme more naturally. I am not 100% sure if i am making any sense here, but to give a practical idea, look at home joomla extensions have regular files and admin files separated, so that administration backend and user front end of joomla gets the apropriate files without any conflicts.

I agree this is difficult to do in ZF at the moment. There is no true sense of a module the way there is, say, in Java. I think what ZF needs to come up with is a concept of "packaging" the way its done in Java. You package the relevant files to books from library and admin in there so it can be extract the same way elsewhere. To keep track of relevant files need one or both of two things:

1. have an IDE that keeps track of the files as i work by packages. So when i create a package "books" it keeps track of relevant files automatically from library and admin modules. I can then have the IDE put them all in an archive file while preserving directory structure which I can take anywhere and perhaps even use it as an extension or a plugin like in joomla.
2. extend Zend Tool to support concept of a package. Right now we can assign controller to a module. We should be able to asign it to both module and a package for the same purpose: let zend tool isolate the files relevant to a package.

Thats my view on things. I want to continue separating using modules based on tasks (list add edit delete) for organization while using some sort of package management to keep track of related classes. May be someone from Zend will eventually do this (i saw traces of this in their discussions) or may be one day i'll have enough resources and energy to play with this myself
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#75
Re:Modular application 2 Years, 4 Months ago Karma: 0
Thanks for your fantastic tutorials!

I've been trying to use custom view helpers with a modular layout however have been experiencing problems as my view helpers won't load and produces the following exception message:

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'DisplayDate' was not found in the registry

My directory structure is setup the same as yours was at the end of tutorial 10.

The helpers I am trying to load are in:
application/
helpers/
Display-Date.php => Zend_View_Helper_DisplayDate

Any ideas as to what might be going wrong??

Thanks for any help
aswebdesign
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Website design in Hertfordshire
Last Edit: 2009/09/30 20:18 By aswebdesign.
The administrator has disabled public write access.
 
#77
Re:Modular application 2 Years, 4 Months ago Karma: 16
Make sure that the directory with your helpers is in HelperPath.
You can add it to the path using $view->addHelperPath, for example,
$view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
alexanderrv
Administrator
Posts: 279
graph
User Offline Click here to see the profile of this user
Gender: Male tmthv2 alexchatonly@hotmail.com Location: Freeport, Bahamas Birthdate: 1989-04-14
The administrator has disabled public write access.
 
#80
Re:Modular application 2 Years, 4 Months ago Karma: 0
Thanks for the reply.

I figured out the problem. The custom helper was should have been saved in DisplayDate.php rather than Display-Date.php!
aswebdesign
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Website design in Hertfordshire
The administrator has disabled public write access.
 
Go to topPage: 12345678...10
Moderators: alexanderrv
You are here: Home Forum

Statistics

Members : 1388
Content : 42
Web Links : 1
Content View Hits : 190530

Poll

Interested in TinyBrowser and TinyMce plugin for ZF?
 

Who's Online

We have 30 guests online