Jump to content

[SOLVED] modular programming


n3p3

Recommended Posts

Hey everybody,

 

I'm working on a CMS script. What I want to do is, to design it as a modul. So that, I can easily integrate it to my future web projects.

and I have some specific questions..

 

1) which design procedure you recommend? I think I need a coding guideline for modular programming.. I'll be glad if you can give me any examples..

 

2) which one is better? to create and parse xml files for content list, event list from database? or to get it as normal text?

Link to comment
Share on other sites

1.  I would recommend the MVC pattern, pretty much the standard in web programming frameworks.

2. depends.  I would not recommend normal text file in any way.  If the content list need to be internal(as in only your application needs access to it) I would recommend database.  IF there is a good chance you want other people to access that data(who would not have access to the database) then the XML file is a good choice.

Link to comment
Share on other sites

Could you please give more but simple information about the MVC..Cause I looked at some articles in resource section, but they are too theoretic for a newbie. And can you give me some examples about the design of my CMS script..Then how can I integrate it to a website using these design patterns?

 

Thank you

Link to comment
Share on other sites

redbullmarky, I have enough experience with PHP but I don't know much about OOP and Design Patterns. I developed many projects and I've seen the improvement in my coding style. Now I'm thinking a little big.. So I started with OOP.

But I really don't have any idea about these design patterns.. If you can help me to start with the main idea behind MVC, I'll be glad. I'm just looking for the way to integrate modular scripts to complicated web projects.

 

Thanks,

Link to comment
Share on other sites

in which case, the best way (IMO) would be to play around with several CMS' that are already on the market and decide which fits the bill the most in terms of what it does, and the way it works and is structured. Some to consider might be Wordpress, Joomla, Mambo, Drupal and even forum software like phpBB and SMF. All of them, to various extent, adopt the MVC pattern (or at least just template seperation) and all allow for extensive plugins/modifications/theming, etc.

 

Once you've found one you're happy and comfortable working with, you can either change it to suit your needs or use it as a guideline to roll your own. You'll learn a tonne about patterns (even if you don't put names to them yet) as you go along.

 

For MVC itself though, try a framework like CakePHP/CodeIgniter and read their manuals. Both offer a decent insight into what MVC is about and what it can do for you.

Link to comment
Share on other sites

Unless you're in a hurry to get some quick and dirty solution, I wouldn't recommend any of those apps. They aren't exactly prime examples of good design.

 

Instead I would look for something ready build on one of the better frameworks, like Zend Framework or Symfony.

 

Symfony has a learning curve, but there's a ready to use CMS plugin for you explore:

 

http://www.symfony-project.org/blog//2007/07/17/a-simple-cms-for-symfony

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.