Solved

MVC vs basic pages

Posted on 2014-04-28
5
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

615 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