Developer roadmap - 1. Moving to MVC. Your thoughts.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
nopCommerce team | retroviz wrote:
snip


Couldn't agree more.

Posts which try to back up arguments with 'I have loads of experience' then go on to argue that silverlight and webforms is the way forward is laughable.

Webforms is not HTML friendly. The web is HTML. Shouldn't we embrace it?

I've said it before in this thread and I'll say it again, those opposing MVC are simply those who don't want to/haven't learnt MVC.

This is what we should be doing:

1) Architectural enhancements in business logic (this has already been started I believe)
2) Move the UI of nopCommerce to MVC
3) ???
4) Profit :)

I would leave the admin system as WebForms for now and concentrate on the part the public interact with. This will create a nice stepping stone for further growth.
13 years ago
Secondly, MVC is just a design pattern and is not exclusive to .NET. Magento (the most popular PHP shopping cart) is built using the Zend MVC framework.

Magento?  Noooooooooo.....  If the switch is made to MVC that's fine but let's not try and emulate Magento.  Most of the eCommerce work I do is on Magento and it has some great features and there are advantages to the Zend framework it sits on.  But it is so convoluted to work with.  There are over 6000 files to deal with and just because you have a clear separation of concerns doesn't mean that you don't end up with spaghetti code in the markup.  Don't believe me? Just take a look under the hood (xml block layouts are so fun. weeeee!)  and you will feel like you just saw that 'Ring' video and only have 7 days to live.

Ben, I agree with most of your thoughts and concerns you have about the current implementation.  I just want to caution anyone who has thoughts about emulating (I know you were only referencing it as an example of a MVC framework) Magento.  Magento is popular despite it's complexity.  All of my customers ask about it because it is loaded with features and has a good 'feel'.  They have zero idea about how it works and don't care.  

Finally, despite many of the earlier comments about the admin section of nopCommerce not being all that important, I disagree strongly.  Comments like that are made by people who don't run real stores.  If you have tens or thousands of products to manage and you have to make 5 clicks to change, update, or delete a product that adds up.  

I have said this in the past and I will say it again.  The biggest issue is not which development platform to go with, rather the uncertainty of not knowing what's going to happen.  Whatever direction is made I have 2 recommendations.

1. Announce the switch as soon as possible.
2. Don't try and just convert everything over to MVC.  Think about how to improve the business logic and features.

My 2 cents.  Maybe 4 cents, I have posted a few times on this.
13 years ago
joebloe wrote:

Ben, I agree with most of your thoughts and concerns you have about the current implementation.  I just want to caution anyone who has thoughts about emulating (I know you were only referencing it as an example of a MVC framework) Magento.  Magento is popular despite it's complexity.  All of my customers ask about it because it is loaded with features and has a good 'feel'.  They have zero idea about how it works and don't care.  


Hi Joe,

Yes i just referenced Magento as an example of a popular eCommerce application using the MVC design pattern. It is certainly not our intention to emulate Magento... why would I want to emulate PHP?? :p
13 years ago
Didn't think so, but sheeeeewwwww!  I am relieved.

If there is anything to emulate from Magento however, it would be the simple/configurable/grouped product types.  Not only are those terms easier for shop owners to understand but they logically make more sense than product/product variant.

Your point about plain old html is what I agree with the most strongly.  I am not a fan of any asp.net controls.  I am currently working on a few modules for nopCommerce that implement jQuery ajax calls to a WCF REST service.  I even started testing jQuery-tmpl and tablesorter plugins.  You just don't need server controls anymore.  My pages load quickly, the user interaction is lighting fast, and most importantly I have clean html markup and little or no code behind.

I get the reasons for the MVC move and I am fine with that if it happens, but I am finding that you can still write good code in webforms that does everything you want.

fyi.  JoeBloe is just a handle.  My name is Trevor.
13 years ago
Whichever direction you decide to go with don't do it all out once, but do it incrementally. In other words, don't do a complete rewrite because that would take WAY too long and decrease the momentum nopCommerce currently has with new and active users because the rate/velocity at which new features are added would drop.

I've used MVC, Silverlight, JQuery, AJAX, etc and I would challenge anyone to see who can build a screen faster with MVC or Silverlight. I gaurantee you I would when hands down with all of the automation, databinding, t4 templates, and controls that are built into Silverlight and the VS 2010 IDE.  MVC is a concept/pattern, yes. But which MVC Framework is the best? I strongly feel that ASP.NET MVC has totally missed the bar when it comes to implementing the MVC Pattern (which I have used since 2002): the view is not as seperated/decoupled from the controller as with Cairngorm and other MVC Architectures. It takes much longer with MVC to develop the same functionality; I have witnessed this firsthand. MVC Lacks controls, so if you like to reinvent the wheel over and over again, then use MVC.

With Silverlight, one doesn't have to piecemill technologies together (HTML, XMLHttpRequest, JavaScript etc) to create a rich user experience. Silverlight also moves/stores state on the client, so it is faster and mitigates load on the server (meaning more users and less hardware). Furthermore, Silverlight will work on cell phones which means (if Silverlight is used) customers can shop using nopCommerce sites anywhere.

I am not saying that ASP.NET MVC is bad, but it definately doesn't rank as the best MVC Framework out there; consider Silverlight and Cairngorm.
13 years ago
ok..MVC or web forms.... phuw....
who cares my web site is written in MVC, or ASP.net or php or JSP as long as profit is doubled every second and I am sleeping on a golden bed? Only developers care.... That's a main difference between us developers and Bill Gates (don't be serious just joke :) Andrei, think which solution will bring Nop commerce $$$$$$? This is very important. if you build a big business with nop commerce, you won't worry about MVC or asp whatever. You can do MVC driven Nop site any time later with the fund :).
13 years ago
breakskater wrote:
Whichever direction you decide to go with don't do it all out once, but do it incrementally. In other words, don't do a complete rewrite because that would take WAY too long and decrease the momentum nopCommerce currently has with new and active users because the rate/velocity at which new features are added would drop.

I've used MVC, Silverlight, JQuery, AJAX, etc and I would challenge anyone to see who can build a screen faster with MVC or Silverlight. I gaurantee you I would when hands down with all of the automation, databinding, t4 templates, and controls that are built into Silverlight and the VS 2010 IDE.  MVC is a concept/pattern, yes. But which MVC Framework is the best? I strongly feel that ASP.NET MVC has totally missed the bar when it comes to implementing the MVC Pattern (which I have used since 2002): the view is not as seperated/decoupled from the controller as with Cairngorm and other MVC Architectures. It takes much longer with MVC to develop the same functionality; I have witnessed this firsthand. MVC Lacks controls, so if you like to reinvent the wheel over and over again, then use MVC.

With Silverlight, one doesn't have to piecemill technologies together (HTML, XMLHttpRequest, JavaScript etc) to create a rich user experience. Silverlight also moves/stores state on the client, so it is faster and mitigates load on the server (meaning more users and less hardware). Furthermore, Silverlight will work on cell phones which means (if Silverlight is used) customers can shop using nopCommerce sites anywhere.

I am not saying that ASP.NET MVC is bad, but it definately doesn't rank as the best MVC Framework out there; consider Silverlight and Cairngorm.


Where to begin.....

"don't do a complete rewrite because that would take WAY too long and decrease the momentum nopCommerce currently has with new and active users because the rate/velocity at which new features are added would drop"

Yet you are suggesting replacing the existing HTML store front with Silverlight. Even switching from ASP.NET webforms to MVC allows for some reuse of markup. Switching to Silverlight does not. Secondly, if you've read any of the posts on this topic you will see that one of the problems the community has with switching to MVC is the learning curve. There may be a learning curve when switching from webforms but at least we're still talking HTML here - not XAML!

"MVC is a concept/pattern, yes. But which MVC Framework is the best? I strongly feel that ASP.NET MVC has totally missed the bar when it comes to implementing the MVC Pattern (which I have used since 2002): the view is not as seperated/decoupled from the controller as with Cairngorm and other MVC Architectures."

Please elaborate on how the view is not decoupled from the controller in ASP.NET MVC. Have you seen any examples of Razor? - views couldn't be any more lightweight and decoupled. I'm sure the team behind ASP.NET MVC would love to hear how they have "totally missed the bar".

"I would challenge anyone to see who can build a screen faster with MVC or Silverlight. I gaurantee you I would when hands down with all of the automation, databinding, t4 templates, and controls that are built into Silverlight and the VS 2010 IDE"

1) we are not trying to build screens here. We are building an eCommerce application
2) I actually doubt you would win here - Right Click Controller Action > Add View. Boom! In about 10 seconds you can create a strongly typed list view without writing any code. Makes creating admin screens a piece of cake!

"Silverlight will work on cell phones which means (if Silverlight is used) customers can shop using nopCommerce sites anywhere."

Where as HTML won't??

Honestly mate, if you are going to post such opinions then back it up with some facts. I'm still waiting for this list of popular ecommerce sites built using nothing but Silverlight??
13 years ago
"Yet you are suggesting replacing the existing HTML store front with Silverlight. "
I would never advocate rewriting any software application completely with a new technology (without justification). I am saying no mater what you decide to use do it incremenetly, even if you decide to use Silverlight.

"Even switching from ASP.NET webforms to MVC allows for some reuse of markup. Switching to Silverlight does not."
With Silverlight, you can build reusable controls very easily, and without having to wire up JavaScript/HTML/AJAX/ASP.NET together for a rich interface. Silverlight is Event Driven on the Client Side (load off server). MVC, AJAX, AsyncPostBacks, etc = load on server.

"Secondly, if you've read any of the posts on this topic you will see that one of the problems the community has with switching to MVC is the learning curve. There may be a learning curve when switching from webforms but at least we're still talking HTML here - not XAML!"
The learning curve for Silverlight is very small because of drag and drop, the VS 2010 Desinger, and all the controls it offers out of the box, but with merit. MVC you have to make almost everything from scratch.

"Please elaborate on how the view is not decoupled from the controller in ASP.NET MVC. Have you seen any examples of Razor? - views couldn't be any more lightweight and decoupled. I'm sure the team behind ASP.NET MVC would love to hear how they have "totally missed the bar". "

With MVC, the goal is to seperate the user interface(View) from domain logic. Razor was conceived because ASP.NET MVC missed the bar when it comes from seperating logic from the view. As a matter of fact, Razor compounds the problem by allowing you to write spaghetti-code including domain logic within the view... Have you seen Cairngorm? There is no business/domain logic anywhere in the view. The view is driven by the Model(Data) which is how MVC should work. Microsoft doesn't get everything right. Just look at the heat they got when they implemented TDD backwards. lol

"I would challenge anyone to see who can build a screen faster with MVC or Silverlight. I gaurantee you I would when hands down with all of the automation, databinding, t4 templates, and controls that are built into Silverlight and the VS 2010 IDE 1) we are not trying to build screens here. We are building an eCommerce application"

First, eCommerce applications are composed of screens/pages whatever you would like to call them. Second, drag and drop, and I have a fully function datagrid with edit/update/delete capabilities with Silverlight. Viola! I win. Plus, there are t4 templates for generating Silverlight admin screens from Entities, or you can use LightSwitch. Silverlight is perfect for admin screens! Even easier than ASP.NET, because of the events and automatic generation of data forms and grids. Additionally, you can put more on the screen, and you don't have to worry about putting everything in tables that don't layout correctly as in ASP.NET. The Silverlight WYSIWYG Designer is better than the ASP.NET one.

Someone said SEO is a concern. Well, Silverlight can be crawled by Google, Bing, and other search engines because the XAML is XML. Flash is not as search spider friendly as Silverlight is.

"Silverlight will work on cell phones which means (if Silverlight is used) customers can shop using nopCommerce sites anywhere.       Where as HTML won't??"
Not exactly, because you have to rewrite it to fit on small screens. The Silverlight presentation layer is scalable, therefore more easily portable to mobile phones/devices.

"Honestly mate, if you are going to post such opinions then back it up with some facts."
I have. Take a look at Silverlight and XAML. It is the future of MS Developement.

"I'm still waiting for this list of popular ecommerce sites built using nothing but Silverlight??"
Silverlight is a fairly new technology and XAML is the future. Eventually, ASP.NET and WinForms will be replaced by XAML. How do I know that? For one, XAML has been around for six years 2005 (it's time to jump on the bandwagon and start leanring: you don't want to get left behind). XAML is the answer for multi-touch technology in the MS world. We could write a multi-touch shopping cart! It is a tried and true technology that has interpolated the market MUCH faster than Flash. Windows Phone 7 was based entirely on the XAML stack. Microsoft is rewriting their applications using XAML (i.e. Windows Phone 7, Windows Media Player, etc, etc). Those are the facts, not opinions!

Okay, again, I'm not advocating to rewrite the whole store in Silverlight, but at least start with some of the administration section and allow for Silverlight apps to be "plugged into the store". I would like to see 3D products implemented using Silverlight, and the JukeBox style viewer for viewing music and DVDs, the ability to preview/turn pages in a book for sale, use multi-touch and both hands to stretch and shrink images.. The possibilities are endless!!
13 years ago
Ben, I wouldn't, it's just not worth it :)
13 years ago
thought wrote:
Ben, I wouldn't, it's just not worth it :)


Agreed, a flame war won't add anything constructive to this thread. Besides, Silverlight was never on the cards as an option to begin with.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.