Jump to content

What MVC should I use for a site that sells a product for a commission for a use


Recommended Posts

I've read Google. Including the the forums with similar questions that had irate posters telling the OP and me to read Google. And I've run back to phpfreaks with my head reeling from discussions based in 2007 (smarty is dead apparently).

What MVC should I use for a user-centric site that has two types of accounts (buyers and sellers), that sells products for the sellers and then takes a commission? The site would be made from PHP, MYSQL, AJAX, CSS and HTML. I have been looking at yii, drupal and Kohana. Although the size of Kohana's and Yii community concerns me. I'd also need to be able to edit the code and possibly the DB(if that's possible). The site would need to be scalable.

smarty is dead apparently

 

That's why they re-vamped their website and released version 3 ;)

Poor guys.

 

A guy that I pay to critique my code said that I should use kohana. Its got a stronger community, but after fiddling with it I've discovered some pretty weak documentation. Oh well, I'll stick with it and practice my OOP. This is the best tutorial I could find, even if the first one is a bit out of date for v3 kohana.

http://net.tutsplus.com/tutorials/php/kohana-the-swift-php-framework/

http://kerkness.ca/wiki/doku.php -links are at the bottom of the unofficial wiki

 

I still think yii looks amazing.. much better documentation imo.

http://www.sheldmandu.com/php/php-mvc-frameworks/php-mvc-framework-performance-part-1

 

Anyone know if you can swap frameworks mid-development or post development?

A guy that I pay to critique my code said that I should use kohana.

 

kohana is a php5 fork of codeignitor. I always though ci looked like a toy framework so haven't given kohana much more of a look in.

 

Anyone know if you can swap frameworks mid-development or post development?

 

Not really. You got pretty well locked into certain interfaces.

 

If you don't a bit of a learning curve Zend is pretty much a standard these days. Its got a decent learning curve mostly because it is so flexible. That's the price you pay I guess. Awesome documentation though. I ended up using it more as a library of components though because I found its routing / controllers pretty slow. The good thing about it being so flexible though is that you can work around / only use what you need to.

Template engines just add another layer that isn't really needed.

 

It's actually quite refreshing to hear that :D I was told that the only thing my application really needed was the front and backend split up using templating... I'm the only developer of the project but I'm well aware of both front and back end so to me it wasn't ever really needed... perhaps if the company was to expand rapidly then it would be worth splitting them up for 2 separate jobs?

 

I went into the Smarty documentation expecting something magical and left quite disappointed... to me it just seemed like I was changing one syntax (PHP) to another (Smarty) for no reason, I don't quite see how this splits front and back as the front-end still contains so much page logic that even throws an exception if coded wrong...

 

Obviously my app could do with numerous updates that removes much of the spaghetti XHTML/PHP/MySQL up

There are better ways to split the backend (bussiness logic) from the front end (markup) and they don't involve template engines. If anything, a template engine ties your front end even further to the back end.

Thing is, if you're using MVC design for your app, I can't see ANY use at all in Smarty. However, Smarty does have a place otherwise it wouldn't be so widely distributed.

 

When you're working a framework and MVC, Smarty will do nothing.

 

Model

View

Controller

 

Your markup goes in the View - which some people then integrate with a template engine like Smarty. Talk about over-complicating a simple task.

You can find decent information via google also ;)

 

You should research design patterns with a focus on MVC. Then look into php frameworks and frameworks in general, template engines etc etc and try to piece it together. These 3 things are completely different:

 

Design Patterns (MVC)

Frameworks (ZEND)

Template Engines (Smarty)

 

Couple of very good books however:

 

Head First Design Patterns http://oreilly.com/catalog/9780596007126

Php Objects, Patterns & Practice http://apress.com/book/view/9781590599099

 

..second one being especially valuable. Every competent php developer has very likely read that book.

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.