Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MVC vs basic pages

Posted on 2014-04-28
5
Medium Priority
?
222 Views
Last Modified: 2014-09-02
We're a small business where our clients have specific business goals to meet and most of the time have specific business reporting. Many of our backend business tools (SCRUD) are built in either msaccess or basic php pages. To explain 'basic php pages', for instance we have a search page that allows management to search customer orders and view details of those orders and cancel or add notes to the orders. The code written for the search page is written basic top down style with database code mingled in with presentation code.

We have recently hired a developer to help us with rewriting our backend process's using MVC style of coding. We're comfortable rewriting our code in top down style with the mingled database/presentation logic. Looking at the code written by the developer in MVC style seems like overkill for what we want to get done and we're trying to figure out the benefits to adjusting our coding habits to think of coding in this MVC style. The developer uses MVC style along with many other 3rd party add on's (slim/paris/idiorm/smarty)

Today I have a simple report to display which would return values from a single db table with only date parameters. I'm looking at the daunting task of learning this developers style along with these 3rd party addons along with MVC style of coding. Its just a little overwhelming and I'm having second thoughts on whether MVC along with all these addons are worth learning to support the rewriting of our backend business tools.

I'm looking for help deciding whether MVC and these addons are worth our time:

What are the advantages of any one style over another, assuming MVC is the most popular are there other alternatives? Data security is our top priority since we're moving our backend tools from an intranet to the internet.
0
Comment
Question by:Dalexan
  • 3
  • 2
5 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40027280
MVC gives your code a clear separation of concerns. You've already stated that you have "database code mingled in with presentation code." This is a fragile design. Now if you have to move to a different presentation framework or if you move to a different database backend, your presentation logic has to change. With a clear separation (doesn't even have to be MVC) you avoid such dependencies.

So, do you have to learn MVC? No. MVC is just the "hottest thing out" right now. That said, it is a solid architectural style, and can be translated into any programming language. It can even be used in non-web projects. Admittedly, there is a learning curve. You would not be doing yourself a disservice by learning the style, though.

MVC can help with security in that your separate out the concerns between the layers. However, it's primary goal isn't security. For security you need to be mindful of how you write your queries, how you validate your user inputs, and how you authenticate/authorize your users.

The only other styles I know of on the web is MVP (model-view-presenter) and MVVM (model-view-view_model), neither of which is as prevalent as MVC. The latter is really more of a WPF/Silverlight architectural style. MVP is close to MVC in structure. If I recall correctly, the only real difference is which layers communicate with each other. I'm sure there are other styles, though.
0
 

Author Comment

by:Dalexan
ID: 40027336
Thanks, pretty good description.
What about the 3rd party stuff, SLIM in particular?
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40027381
I have to defer on those. PHP is not my main language, so I am unfamiliar with the 3rd-party tools available for it.
0
 

Author Comment

by:Dalexan
ID: 40027474
Thanks Kaufmed, you've won most of the points but I would still like to hear more comments regarding the 3rd party stuff. SLIM,idiorm etc...
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40298567
I should correct myself on an earlier statement. MVVM is actually growing in popularity. Many of the Javascript frameworks out now are leaning towards MVVM.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question