SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    php framework...to used it or not?

    Hi

    I need an advice & opinion from more experienced PHP programmers here...

    I manage to create my own small CMS with php and mySql, and after working with it for over an year, I am thinking of bringing my small CMS on next level. I create different modules, like articles(pages), news, products, projects, faq, additional products images (for creating gallery for specific product), additional article images (for creating a gallery in the article-page) etc...

    At this time according to the customer needs, I manually upload the pages from each module that I need, and I manually create the database.

    My code is very old fashioned, with minimum uses of functions, and no classes. For the front end, I have different queries for different tables, and according to the design created by designer, I place the code for the front end, and the site is done.

    Now, I would like to re-work my cms, this time with use of OOP, that is using classes & functions in an effort to minimize the time needed for site creation. Also, in the future, I would like to create an installer at least for the back office, since the front end will always have custom design, and I will have to place my code manually anyway...

    My problem is that I am not that good with writing classes and functions.

    My question is: will use of framework like a code ignition will help me to save the time with this project? Is it worth to learn the framework (his classes, functions etc...)

    Or is better to sit down on my ass, and learn how to do everything by my own? What would you do in my situation?

    Thanks in advance for your opinions & advices...

    Regards, Zoreli

  2. #2
    SitePoint Enthusiast
    Join Date
    Sep 2009
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like your not massively experienced so writing a CMS may not be the best option. I suggest you at least have a look at some MVC style frameworks, just to get a feel of how different entities of a web application interact with each other, and how it all comes together.

    You could rewrite your CMS using 'functions and classes', but the presence of classes in no way means the code will always be good. You can use classes and still end up with bad code or a bad system.

  3. #3
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zoreli View Post
    My question is: will use of framework like a code ignition will help me to save the time with this project? Is it worth to learn the framework (his classes, functions etc...)
    Whether it's worth or not to learn to work with a specific framework is something you have to decide by yourself.
    And to do so, you have to have to know how much work is involved to learn it.
    ie hard to know up front

    Using a framework has many benifits but that doesn't mean it's good for everybody.

    I know, that answer doesn't bring you any further. sorry about that.

    In your specific case it might not be the best idea to use a framework for rewriting your cms. Depending on the framework you want to use you will have a long or a pretty long learning curve. And bear in mind: Using a framework doesn't mean you don't have to know OOP - the opposite is true
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  4. #4
    SitePoint Enthusiast praveenkv1988's Avatar
    Join Date
    May 2011
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using frameworks will improve your website a lot. You can reduce many security issues. Use CakePHP or CodeIgniter. Both are good and easy to learn.
    Happy Hosting
    Managed VPS Hosting with CPanel/Plesk/DirectAdmin.
    Managed Windows / Linux Dedicated Servers.

  5. #5
    SitePoint Addict
    Join Date
    Apr 2011
    Posts
    265
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Hy,
    My opinion is that before to learn to work with a framework is better to learn how to create and use classes and objects.
    Than you can understand better how an aplication with classes works.
    Free: Web Programming Courses HTML, CSS, Flash
    Web Programming: AJAX Course and PHP-MySQL Course video Lessons
    Good JavaScript and jQuery course for beginners

  6. #6
    SitePoint Member
    Join Date
    May 2011
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MVC based frameworks are good to use, but you still need that underlying knowledge of Object Oriented PHP. You can get much more out of it if you're able to understand how the framework does things.

    Learn to swim before you learn to dive.

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe you could try a different approach and instead of "reinventing the wheel" try one of the existing CMS systems: Drupal, Joomla or Alfesco to name a few - all three free and open source.

    This way you can concentrate on your own customizations (by writing modules for your specific functionality required) rather than building the whole thing from scratch.

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using an MVC framework like codeigniter is a great option. It has a lot of libraries out of the box to help you not reinvent the wheel and it doesn't force you to use strict mvc patterns while you learn the best practices.

    MVC is that. A pattern. You don't need a framework to implement the pattern. A framework is usually a box of tools built with the best intentions with other patterns, like Front Controllers, already done for you.

  9. #9
    SitePoint Member
    Join Date
    Oct 2011
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a huge fan of frameworks and PHP code generators, I made a few courses of PHP and then fall in love for those generators, bascially most of my learning into PHP was on those generators and I fell that I dont have many gaps in my learning curve, OK, maybe there is some very basic stuff that I may dont know how to do but in other way I focused the learning in the real advanced things, was learning what really matters.

    Using those PHP code generators such as scriptcase for example will teach you the correct flow in how to develop for web, if you want to start using a framework I would recomend you to use scriptcase.

    But you can never forget to keep studing, that's my tip. Hope that this text helped you a little bit.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •