Religious question - MVC benefits vs ASP.NET?
-
I'll step in and catch the cricket ball for him. It's okay. I'm wearing protective gear. This is a highly idealistic, and thus often unrealistic, view of the world. Yes, ultimately the money in the payroll account comes from the guy on the streets who buys your product. If, of course, you're in the business of selling software. There is a huge amount of software development for companies who offer products and services which have nothing to do with software, but still depend on internal systems to keep the wheels turning.
Mark_Wallace wrote:
The best methodology is the one that best provides the user with what he needs.
I would love it if this were true. However, in the world of business and commerce, it's not. The best methodology is one that delivers the functionality required to keep your company profitable, and does so fast enough to be effective. It doesn't matter how cool your app is if it never ships. If the CEO takes your company down a path that prioritizes time to market over the way you'd like to do things and you resist, you're out of a job. Your manager does not pay your salary out of his pocket. However, he gets to choose whether or not you can continue to stick around and keep receiving it. Alienate him by digging your heels in over unrealistic expectations, and you're out of a job. The marketing department is responsible for the money in the payroll account. If you don't give them what they need to move the merchandise, you still have a job. You just don't have any money in the payroll account. If you want to make a living as a professional software developer, the best methodology is the one that meets the needs of your company, not the one that adhere to your personal religion of software development. The company writes your check. Fail to meet its needs, and that will end. Abruptly. You've been around a long time, man. You know that the way the world works isn't always the way it should work. Give the guy a break, and save the cricket balls for your next company picnic. :)
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013)
Christopher Duncan wrote:
You've been around a long time, man. You know that the way the world works isn't always the way it should work.
Sure, but the way it was phrased looked like "Whatever makes it easiest for me is best", and -- unless "me" is the customer -- I take pretty severe exception to that.
I wanna be a eunuchs developer! Pass me a bread knife!
-
Christopher Duncan wrote:
You've been around a long time, man. You know that the way the world works isn't always the way it should work.
Sure, but the way it was phrased looked like "Whatever makes it easiest for me is best", and -- unless "me" is the customer -- I take pretty severe exception to that.
I wanna be a eunuchs developer! Pass me a bread knife!
I think this is one of those places where we could both be right. If his intent was screw everyone else, make my life better, I'd be inclined to agree with you. On the other hand, I've always been highly motivated to deliver the goods for the people who pay my bills, so the way I read that statement was, "Whatever makes it easiest for me to get the job done," which of course is a completely different perspective since it focuses on serving the guy who holds the checkbook, and my benefiting indirectly from that act. Either way, I think cricket balls are inappropriate. Personally, I recommend light sabers. :)
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
-
Right, we use mocks (moq), but then that is not really executing all the db level stuff in the business layer, just verifying that the calls are actually made...
This is how i test my database structure: http://effort.codeplex.com/[^]
Quote:
Effort is a powerful tool that enables a convenient way to create automated tests for Entity Framework based applications. It is basically an ADO.NET provider that executes all the data operations on a lightweight in-process main memory database instead of a traditional external database. It provides some intuitive helper methods too that make really easy to use this provider with existing ObjectContext or DbContext classes. A simple addition to existing code might be enough to create data driven tests that can run without the presence of the external database.
Eric
-
Chona1171 wrote:
What makes a programming methodology better for me ? Speed of development.
I have a cricket bat that could cure you of that opinion. The best methodology is the one that best provides the user with what he needs. Never forget: -- You do not pay yourself your salary. -- Your manager does not pay your salary. -- His manager does not pay your salary. -- The tossers in HR do not pay your salary. -- The marketing department does not pay your salary. -- Architects, COOs, CEOs, and everyone else who works for your company do not pay your salary. It's the guy who buys your product who pays your salary, so no-one else's opinions or needs matter worth a damn, including yours.
I wanna be a eunuchs developer! Pass me a bread knife!
"It's the guy who buys your product who pays your salary, so no-one else's opinions or needs matter worth a damn, including yours." Agreed but that does not help for jack when your release date is constantly pushed onwards , nor does taking longer unnecessarily push up income from a perviously agreed upon quote now does it ? Now if a customer comes to me and expressly forces me to use a framework , sure I would be open minded to it , but when i discover the framework will take me longer , its the customers bank account that will feel it. But can anyone , show up hands ? tell me that a customer dictates technology (unless they are a technology oriented firm themselves )
Chona1171 Web Developer (C#), Silverlight
-
Like you, I'm optimized for development speed. However, our company has one heavily database oriented app that suffers significant performance problems, enough to disrupt operations. I want to get it done quickly, but it also needs to hold up under a heavy load. I'm not sure if MVC is the silver bullet many think it is or not, but I'm open to considering it.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Good design would be a way to go , 1. If you database is massive try checking that hard disk contention is not the problem , try splitting your tables across different drives. 2. Use paging when accessing large quantities of data . 3. Design a solid data layer that tightly wraps with business logic 4. If your Web requests are taking a knock, try distributed computing (Quite a tricky one but easier with IIS) All these are achievable through both methodologies , but with MVC you are going to sit longer on developing interfaces
Chona1171 Web Developer (C#), Silverlight
-
Good design would be a way to go , 1. If you database is massive try checking that hard disk contention is not the problem , try splitting your tables across different drives. 2. Use paging when accessing large quantities of data . 3. Design a solid data layer that tightly wraps with business logic 4. If your Web requests are taking a knock, try distributed computing (Quite a tricky one but easier with IIS) All these are achievable through both methodologies , but with MVC you are going to sit longer on developing interfaces
Chona1171 Web Developer (C#), Silverlight
The things you mentioned are all solid basics that apply to pretty much any platform. While it's not my project, I think they have a concern with the weigth of viewstate (it's a global app and not all countries have good Internet speeds) and things of that nature.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
-
Damn I missed the original thread, I would have been interested in this 3 months ago. We have a senior dev trying to put together a framework using Kendo, the usual, grid, navigation, dialog, and a bunch of standards. All of which we have nailed using Silverlight and it seem a huge amount of coding to get even a klunky UI together.
Never underestimate the power of human stupidity RAH
My thread is more recent than 3 months ago , but yes , with MVC you are going to put allot of time into code that in asp.net is a simple property (for example paging) Good news however in MVC4 your can already put asp.net server controls in which helps a lot. but the pattern still kinda screws you when it comes to hooking up events. Thats why MVC for me is a nice try but not there yet Same reason why i didn't use silverlight until it matured
Chona1171 Web Developer (C#), Silverlight
-
I think this is one of those places where we could both be right. If his intent was screw everyone else, make my life better, I'd be inclined to agree with you. On the other hand, I've always been highly motivated to deliver the goods for the people who pay my bills, so the way I read that statement was, "Whatever makes it easiest for me to get the job done," which of course is a completely different perspective since it focuses on serving the guy who holds the checkbook, and my benefiting indirectly from that act. Either way, I think cricket balls are inappropriate. Personally, I recommend light sabers. :)
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Christopher Duncan wrote:
I recommend light sabers.
Cricket bats are heavier (there's a clue in the names).
I wanna be a eunuchs developer! Pass me a bread knife!
-
Christopher Duncan wrote:
I recommend light sabers.
Cricket bats are heavier (there's a clue in the names).
I wanna be a eunuchs developer! Pass me a bread knife!
Swinging a heavy stick is a time honored practice dating back to ancient times. Ah, a traditionalist! :-D
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
-
The things you mentioned are all solid basics that apply to pretty much any platform. While it's not my project, I think they have a concern with the weigth of viewstate (it's a global app and not all countries have good Internet speeds) and things of that nature.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Well did you know you can make the viewstate the server's problem Yes some pages kicks out an insane amount of viewstate , but with simple code you can hide your viewstate in a session , never to be seen by the page again.
Chona1171 Web Developer (C#), Silverlight
-
Swinging a heavy stick is a time honored practice dating back to ancient times. Ah, a traditionalist! :-D
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Christopher Duncan wrote:
Swinging a heavy stick is a time honored practice dating back to ancient times.
Hey, Jedi-ism predates cricket by millennia! If anyone's a Luddite, here, itsa ain'tsa meesa!
I wanna be a eunuchs developer! Pass me a bread knife!
-
The things you mentioned are all solid basics that apply to pretty much any platform. While it's not my project, I think they have a concern with the weigth of viewstate (it's a global app and not all countries have good Internet speeds) and things of that nature.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Heres some code you can use in your asp.net page
protected override object LoadPageStateFromPersistenceMedium()
{
object viewStateBag;
string m_viewState = (string)Session["ViewState"];
LosFormatter m_formatter = new LosFormatter();
try
{
viewStateBag = m_formatter.Deserialize(m_viewState);
}
catch
{
return null; // throw new HttpException("The View State is invalid.");
}
return viewStateBag;
}
protected override void SavePageStateToPersistenceMedium(object viewState)
{
MemoryStream ms = new MemoryStream();
LosFormatter m_formatter = new LosFormatter();
m_formatter.Serialize(ms, viewState);
ms.Position = 0;
StreamReader sr = new StreamReader(ms);
string viewStateString = sr.ReadToEnd();
Session["ViewState"] = viewStateString;
ms.Close();
return;
}however it just need some minor adaptations to account for when a user opens more than one page at the same time (you may run into corrupted state problems) What I do is I cancatenate a string to the veiwstate id Session["ViewState"+hashkey] and i generate the hashkey by using a SHA hash alogoritm with the current url as input , and a whipe the session on page not IsPostback
Chona1171 Web Developer (C#), Silverlight
-
run to mvc - don't walk. say goodbye to gargantuan viewstates ;P in a few months you'll wonder why you wondered
-
Christopher Duncan wrote:
Swinging a heavy stick is a time honored practice dating back to ancient times.
Hey, Jedi-ism predates cricket by millennia! If anyone's a Luddite, here, itsa ain'tsa meesa!
I wanna be a eunuchs developer! Pass me a bread knife!
-
Hopefully this doesn't count as a coding question. My boss pinged me today about considering the move from asp.net to mvc because it's supposed to be better for n-tier database and performs better then asp.net web forms. I have absolutely no experience with or knowledge of mvc, so I thought I'd see if there was a general consensus in terms of whether or not it's a better architecture to do database intense web development with. What are your thoughts?
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
There are so many benefits to MVC: - Due to a brittle and convoluted way of doing things they will have to hire ten more programmers and you will become their manager, which is kinda of a promotion. - Because there are no more controls, you will have to hand code every single piece of crap, which will make your system truly unique. - Because Microsoft kinda bundles their implementation with their wonderful almost divine version of an ORM you will get to experience the wonders of flexibility (and performance) that an Entity framework enables. etc etc
-
I would think that moving from Silverlight, which is a more Flash-like and rich media oriented creature, to the more html oriented world of asp.net or mvc would be challenging on any numbe of levels. I really miss native development. I can't believe that in two decades, the best we've been able to do with a global TCP/IP network is application development housed in an amped up document reader. The web browser was never intended to be a serious development environment.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
Why? I look at the browser as a portal. Nothing but a window to interact with something else. The good, is no matter what "window" (browser) and what "house" (OS/equipment) you have, you will interact with the same thing. The bad. The "window" builder sometimes mess up and the view you get from it get's distorted and sometimes unuseable.
-
There are so many benefits to MVC: - Due to a brittle and convoluted way of doing things they will have to hire ten more programmers and you will become their manager, which is kinda of a promotion. - Because there are no more controls, you will have to hand code every single piece of crap, which will make your system truly unique. - Because Microsoft kinda bundles their implementation with their wonderful almost divine version of an ORM you will get to experience the wonders of flexibility (and performance) that an Entity framework enables. etc etc
Brittle and convoluted I can learn. The lack of controls I've read about is indeed one of my concerns.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
-
My post from previous forum message: On to an issue whether or not we should move to MVC development I have been debating this with my developers now for months. And some insist MVC is better though I just dont see it. What makes a programming methodology better for me ? Speed of development. Developer spending less time on interface and normal features and more time getting validation and business logic to be solid Code that is easy to understand by new developers taking on the project Structure that is easy to follow and you dont have to jump between mappings and target pages to check how they link Ability to create reusable controls Visual designer , so you dont have to repeatedly code something as mundane as a table. Scalability When working with MVC4 Razor Visual designer Gone ;( No Server Controls Hooking up an event is manually coded (instead of double clicking or hooking up an event Single controller multiple pages Bottom line is what is quicker , on asp.net I can drag a button on the exact spot i need it double click (3 seconds later) I have a button named and hooked up to an event without touching the keyboard. which the mvc guy is still busy typing his input tag , not to mention switching between the controller and the markup screens creating a event and a model. When i used a aspx grid , I get a nice linq data source hook it up to a grid, columns gets auto generated , meaning all i have to do is change the column headers , click that I want to enable sorting and paging , and I am done 2 minutes later. and if I have not too complex columns the add edit and delete features are created for me in one shot which can be configured for more complex scenarios's Now as an mvc developer doing the whole grid thing , everything has to be coded , I have to code my data queries (be it LINQ or SQL) to do the paging and sorting , 2 hours an insane amount of typing and script later I have something that kinda does the same thing but looks butt ugly. I guess an expereinced MVC dev can do it in probably 10 mintes flat My Recommendation, MVC is ok for cases with little complexity and smaller size projects, but when you need to deliver something of great scale and complexity you are shooting yourself in the foot as you will still be coding interface logic when a asp.net dev is long done with the project. Also just in case you wondering I know 1 MVC does not have viewstate : good practiice minimises viewstate/ you can also hide your viewstate in session using very basic code, al
-
Well did you know you can make the viewstate the server's problem Yes some pages kicks out an insane amount of viewstate , but with simple code you can hide your viewstate in a session , never to be seen by the page again.
Chona1171 Web Developer (C#), Silverlight
My general impression is that in order to really gain the performance benefits of mvc, I'll need to shift a lot of my logic from a server side / postback paradigm to lots of javascript handling it in the client. While that would eliminate a lot of round trip hits, not wild about javascript coding.
Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World
-
First of all, ASP.Net MVC is "NOT" better than ASP.Net Webforms. Both are different frameworks for different use. Both have Advantages and Disadvantages over each other. Many people have wrong idea that 'MVC' is the new version of 'Webforms' and they should move to MVC just because it's so much better than Webforms (If you believe this, you lack information about both the framework). Microsoft is going to develop both the frameworks in parallel (Webforms is not going away). I have been using ASP.Net Webforms since last 6 Years, and ASP.Net MVC since last 2 Years. Here are my thoughts... Webforms Pros: Your team already knows this, Richer controls, Years old methodology, Much higher talent available in the market, Easier to switch (PHP or Java developers have to learn only new syntax and not new concept) Cons: Unit Testing is not as seamless as MVC, Viewstates are making it little bit heavy compared to MVC, Lesser separation of logic compared to MVC (this is debatable) MVC Pros: Seamless Unit Testing, Clear Separation of Logic (this is debatable), More control over UI, Lot more code will be generated automatically for CRUD, Cleaner HTML Pages Cons: Completely new concept, No Design View, No more awesome controls, Big learning curve for your team. Less mature compared to Webforms Before you consider switching to MVC, you need to address two main questions. 1) How many developers are going to transitioned to MVC? If lot of people from your team has to learn MVC, then this is unnecessary exercise. Because the gain could be balanced by purchasing more computing power (this is cheap nowadays), and spending little bit more time on Unit Testing. compared to having every one to learn new methodology. 2) Are you going to rewrite existing application to MVC, or going to start a new application. If you are going to write a brand new application with the MVC, then it's OK. But if you are going to rewrite existing application, then you are looking for trouble. The rewrite will cause new bugs, your team who just learned the new concept, will face new challenges. and you could have added lot more new features to you Webforms application in the same efforts, instead now you have added new bugs and the new features are now in a pending state. So is it worth the time and money? When I switch to MVC, I remember struggling for a month changing my mindset to a new concept. And now I know MVC and we have launched our awesome product, it's cool and I like it. But I
Good insight, You know what irritated me during tech ed was that no one was using webforms , it kind of creates the perception with managers and technical architects that MVC is the new ASP.net granted it has some cool stuff but with MVC at its current state I cannot within any reason believe that a MVC developer can outcode and release faster than a asp.net developer of equal measure. unless its a "hello world" app. MVC is slightly faster I will admit , but with bandwidth increasing and our mobile phones being able to outrun what we considered fast pc's 10 years ago , I really think coding for the sake of faster code kind of like paying double for a package to arrive 5 minutes earlier.
Chona1171 Web Developer (C#), Silverlight