Hi to all core developer and community.
Do you think it will be crucial for us to have some kind of extended library to be use, instead of just depending on API? I don’t want the API to get bloated away with people’s request, instead the community will maintain their own library, some kind like pear package for MODx.
So far I have a UserMgmt library that I would like to have to be included on MODx.
My suggestion will be to have another folder in assets called "lib". Each library package need to be created as a class that are compatible for php 4, not only 5. The naming will be usermgmt.class.php. The version numbering and release date will be inside the class. Oh, we also need to isolate each library on a subfolder with the same name as the lib, for example usermgmt/usermgmt.class.php.
With this lib, we can have a fully maintained extended API for MODx. Another thought will be, to have an extended template processing library to be used when creating a snippet.
So far if I would like to achieve repeater like system on ASP .Net, I need to have 5 different chunks as a template (Header, Footer, Separator, Item, AltItem).
Now I want this to be combined with special templating syntax on single chunk. The reason I choose this repeater model, because I find it really flexible. You can do whatever that you want with this, without limiting your imagination of design on specific table look or any generated html output. I’m thinking to have the Item and AltItem to have a name like Item1, Item2, Item3, and so on. So we can have more than odd and even alteration for the loop.
Another templating syntax idea that I have will be, to have a data binding looks of ASP .Net as well. Imagine if we can process the data on the placeholder, before we parse it to the template, but all the configuration option can be defined in the template itself? Here is a clear example, I have this placeholder in my template {+createdon:date:%d-%m-%Y+}. So what it does is actually replace the placeholder createdon on the template with the one that was defined by the code, but before it is being pasted to the templte, it needs to be processed by function/method called date, and the parameter to be passed will be "%d-%m-%Y". So this function will responsible to handle the final output of the system, just like widget on TV. By having this, a snippet creator able to exntend the class and add whatever function that they want to substitue the date and ebing used on the template.
That’s the 2 major things that I can come up with for now.
Any response will be great
-
MODX Staff
- 12,272 Posts
If it’s an extension to teh core that is not required, I’m 1000% for it. And would personally use it, too.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
The library thing is a great idea and something that we really do need to deal with. It’s something that can be done with plugins but it’s not especially efficient. We also need to work out a dependency system for the libraries. This could be handled in the code and should be handled in the code itself but it would also be nice to have more user friendly dependencies during the installation process.
I have a feeling that some of the things Jason is working on will take care of at least part of the library issue while some of the things Raymond is working on will probably take care of some of the templating things you’ve mentioned.
Lot’s of great ideas. Wendy keep ’em coming.
-
☆ A M B ☆
- 24,524 Posts
And I still miss that ez-sql library!
-
MODX Staff
- 1,535 Posts
Brilliant idea, Wendy! I would definitely find them a useful addition.
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
Thanks for all the response. Honestly, I would like to make this library now, but I’m still thinking about the possibility that this library won’t be usable for the next releases.
If Raymond is in here, it will be awesome, because I would like to know what other things that he has in mind right now. Especially the GreenCore thing. If this library can be the option as part of the GreenCore, then it means, it won’t be any overlapping work between what I did and what Raymond did, do basically we have a better workflow in improving the system.
Quote from: Djamoer at Feb 03, 2006, 12:28 PM
If Raymond is in here, it will be awesome, because I would like to know what other things that he has in mind right now. Especially the GreenCore thing. If this library can be the option as part of the GreenCore, then it means, it won’t be any overlapping work between what I did and what Raymond did, do basically we have a better workflow in improving the system.
Hi Wendy,
Wonderful ideas and I can see that you’re familar with ASP.Net
Firstly GreenCore will be extremely extensible. You can extend the api with your custom functions:
$modx->loadExtenstion(’LDAP’);
$modx->ldap->connect();
GreenCore will also feature a new Parser that will allow you to do virtually anything you want to do. You’ll be able to create custom tags, and have there parameters passed to you scripts.
The system will feature new controls. Example the DataReapeter control will also support styling etc. You could also create your own controls with just a few lines of code.
In addition to ui controls GreenCore will support the DataSource control. This will allow you to bind objects to a data source (similar to @Bindings)
In summary you’ll be able to do just about anything you want with the system. You can take it apart and put it back together without affecting the core files.
Did this help to answer your questions?
Is there anything that you think I can start working on and being use by the Green Core? I like to code something useful, but if the new release of GreenCore will eliminate the needs of the library that I’m planning to make, than what’s the point of coding it, right?
If we’re talking about Tattoo, then it’s a whole different story, and I’m anticipating that my code won’t work in the new release of Tattoo, but I want to make sure that my code is still going to work just fine on the new release of MODx, or if it’s something that can be contributed into the core, I wouldn’t mind either.
Raymond, feel free to email me anything that you think it’s better for me to do right now. I would love to discuss my whole idea as well about creating a new breed templating system that are simple and optimizing the previous example from all the giant templating system such as Smarty, patTemplate, ASP .Net, textpatern maybe, and etc.
Sincerely,