is it worth using a framework or just adopt a modular approach?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • malcolmk
    New Member
    • Sep 2010
    • 79

    #1

    is it worth using a framework or just adopt a modular approach?

    Just starting php and think it may be a good idea to use a framework to establish good codeing practice from start.
    Have downloaded and installed codeigniter on my local machine.
    when I have produced my hello world or whatever, how do I upload it to my isp server? do I just upload files from controller and view folders? upload project folder, the whole codeigniter setup or what?
    does it depend on my isp having codeigniter support built in or what?
    Thing is, as I understand it a framework such as codeigniter changes the way that info is passed between modules so, does the code produced in a given framework depend on that same framework being present on the live host isp?
    If the case is that the host isp MUST have codeigniter (or any other framework) installed then it seems to me that unless you have your own server you are stuck?
    Is it possible to adopt a similar modular approach using standard php coding?
  • TheServant
    Recognized Expert Top Contributor
    • Feb 2008
    • 1168

    #2
    A framework like CI should be entirely uploaded to your server directory. So where you would normally have your index.php and all that, you can put the contents of the CI file (which includes an index.php) there.

    Then, you would simply edit/update/upload into your MVC folders.

    While a framework is great for bigger projects, if you are only starting to learn PHP you may be getting in a car before you understand the wheel... The pleasure of CI is it saves you time as it has already made classes etc, but if you don't understand the alternative, or how to do it without the framework, you will probably end up with a bland CI program. It's the hard yards without a framework that make you understand the framework, and use it better.

    If you already know PHP, and are familiar with the MVC approach, go nuts as it's a great framework.

    However all this is my opinion and others (experts) probably have some good (possibly contradicting) advice.

    Comment

    • malcolmk
      New Member
      • Sep 2010
      • 79

      #3
      thanks for the advice, may possibly stick with notepad and plenty head scratching for now then. When you say codeigniter already contains an index.php file it points to the welcome screen, so how would I get visitors to see my splash screen instead? Simply use my own index file?

      Comment

      • TheServant
        Recognized Expert Top Contributor
        • Feb 2008
        • 1168

        #4
        Either edit the index file to point to the splash view, or yes, replace the index file. If you are keeping CI on there, I would make a splash view and point the index to that, but if you are going to try without a framework to start with, then, just get rid of all CI files and have your own index file.

        There are lots of good editors to make PHP writing easier, like:
        Notepad++ (free)
        PHPDesigner (~approx. 45 USD - I use this one for PHP)
        And even NetBeans (free) has a PHP IDE (although I have never used this for PHP)

        All these just help with highlighting code, changing colors for things. It's much more user friendly than classic notepad. Just stay away from Dream Weaver...

        Comment

        • Markus
          Recognized Expert Expert
          • Jun 2007
          • 6092

          #5
          Do *not* stick with notepad - that's just inflicting unnecessary pain on yourself. And, yes, DreamWeaver is a much greater evil.

          Comment

          Working...