Ryan
Ryan

Reputation: 2660

Recommend guidance for web design patterns?

I've been coding a website for the past 6 months using HTML/CSS/PHP/MySQL/Javascript. I'm coding all independently and finding it hard to interact with all of these technologies.

For instance, I have been writing PHP code to echo HTML output. I find this very messy and hard to maintain. Also, I'm finding myself doing redundant database calls because I don't have an easy way to call once and distribute the information to multiple other technologies (e.g. Javascript and PHP). These are just a few things that have caused me trouble.

From a very high-level, are there some approaches or design patterns that are used to make this process easier and more elegant? Any books or frameworks that someone could recommend?

I assume this can be done in a cleaner way. Thanks!

Upvotes: 0

Views: 122

Answers (4)

rabidmachine9
rabidmachine9

Reputation: 7975

Using a framework will answer lots of the problems you have right now and it probably gonna create some new...but for sure it's gonna help make your projects cleaner and more reusable...I personally use codeigniter and it really good although you are free to choose between lots of PHP frameworks that exist out-there, the most common architectural pattern used is MVC, allow me also to suggest looking at Python(with django) and Ruby(on Rails) which have really strong communities and are probably better featured languages than PHP, so they seems like a good choice nowadays.Good luck.

Upvotes: 1

Ben Lee
Ben Lee

Reputation: 53349

One of the most common web development paradigms is called MVC -- "Model, View, Controller". Using this approach you separate the various concerns of your page very well. Models handle the business logic of your application, controllers handle the web interaction, and views handle the output to the user. One popular PHP MVC framework is CakePHP.

Upvotes: 1

Joel Etherton
Joel Etherton

Reputation: 37543

You might find the features you're looking for in a framework. This will help make data access and object structure a little more useful. There's a learning curve. Here are a couple of popular ones:

Zend Framework
CakePHP

Upvotes: 0

CoolBeans
CoolBeans

Reputation: 20800

A very common design pattern used is MVC. This pattern is focused on letting you separate your business logic from your view layer. There are also a set of screen patterns that you can found here.

Upvotes: 0

Related Questions