Coffeehouse Thread

70 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Questions regarding "Web pages" vs "Web forms" vs "MVC"

Back to Forum: Coffeehouse
  • User profile image
    kettch

    @WhatDoYouMean: What do you have against LightSwitch? Besides, I don't see how you can compare it to MVC. LightSwitch creates a lot of generated code that builds views at compile time. The only issue is that you don't always have control over a lot of thigns. However, MVC scaffolds the basics and allows you to do whatever you want with the result. There's nothing wrong with things being scaffolded out. Frankly, I'm bored to tears by having to manually wire up everything.

    There's no need to manually parse requests, and it's not magic. If your parameter is named 'x', then ~/controller/action/x is going to work. With PHP, you may have to get fiddly with every little detail, but MVC allows you to set up some conventions that are as simple or complex as you'd like, and it wires things up based on the conventions.

  • User profile image
    WhatDoYou​Mean

    @MasterPie:Would this approach be wrong:

    I create a separate asp.net project and use a say .ASHX to puke out XML-data then I manage that XML-data into my MVC project and just "show it". All business logic and such will be done in that separate project.

    Is that a bad thing? Any recommendation or is it a good way to do it?

  • User profile image
    MasterPi

    WhatDoYouMean said:
    Just for the record, I DO like this whole MVC thing but I dislike the lock-in potential of it and having seen where Microsoft is headed with Windows 8,

    If you work in Ruby on Rails, your code will not automatically work if you move it into a PHP environment. You'll have to rewrite it all. Same thing vice versa. I don't understand why you think this "lock-in" potential is specific to ASP.NET MVC?

  • User profile image
    kettch

    @WhatDoYouMean: Lock-in? What if I had to make an "emergency" (what does that mean anyway?) Move away from PHP? I'd have to rewrite everything anyway. There's no scenario where you can port a project from one platform to another via CTRL+C, CTRL+V.

  • User profile image
    WhatDoYou​Mean

    @kettch: Lightswitch isn't programming. It's "File maker". I have nothing against it, however. I just don't feel like getting locked into something "too much" without a way to scape.

    It's exactly the same when we do choose a business to take care of the IT or out networking systems. You don't want to get too much locked-in in case you want to switch to someone else.

    It's just a way of having the door half-open, just pure business thinking.

  • User profile image
    MasterPi

    @WhatDoYouMean: That would "work". I'm not sure if it's ideal, as I still don't understand what your goals are and why you're so "scared" about MVC/Lightswitch.

  • User profile image
    WhatDoYou​Mean

    @MasterPie:I don't think this lock-in potential is specific to MVC. Anything we use over here, we must make sure to have a way "out".

  • User profile image
    MasterPi

    , WhatDoYouMean wrote

    It's just a way of having the door half-open, just pure business thinking.

    But if you're constantly leaving the door open, you're never really closing it, which can let in a draft and raise your heating bills in the long run. By not committing entirely, you're not going to be very productive and you might just waste a lot of time (and money) investing in ways to keep your platform so flexible to support your various jumps from ship to ship.

    Though, I'm not one to tell you how to run your business - it's your call in the end.

  • User profile image
    WhatDoYou​Mean

    @kettch: Emergency means, well if you read my other thread you will know what I mean. We are moving away from developing for Windows Clients, THAT is an emergency.

    I know I can't just copy/paste code from C# to PHP but the general building of it must be a way so it's "clear" what's going on and all automations should be handled by "us" and not some weird automagical function.

    For example the MVC Demo, I see a ready made "ChangePassword" function. What the heck? What business would want to use that and get locked-in?

    I find the MVC demo very "un-codey". Hard to explain.

    The only aspect I like is the separation but we don't really need Microsoft MVC to separate like that.

  • User profile image
    blowdart

    , WhatDoYouMean wrote

    @blowdart: Parsing requests is exactly what I need to do because in case I need to move this thing out of MVC into PHP, it would make it MUCH harder to understand the code because frankly, there isn't much "coding" going on in that Demo atleast.

    OK so you are going to write code in C# to parse a request object. Code that wouldn't work anyway if you went to PHP ... umm ...

     

  • User profile image
    WhatDoYou​Mean

    @blowdart:Yes but I see where the Request is being parsed. It gives a very easy clue how to "convert" it to PHP. ( I'm using PHP just as an example. )

  • User profile image
    kettch

    , WhatDoYouMean wrote

    @kettch: Lightswitch isn't programming. It's "File maker".

    Actually, I have a LightSwitch project that has a few thousand lines of highly portable business logic. Contrary to what I said before, I could copy and paste that logic into another .NET platform and it would still work the same with only minor tweaks. LightSwitch is just a quick way to build the UI and data access. Having used FileMaker in the past, there is no comparison between the two.

    LightSwitch, MVC's "magic", all if it has a place. You want to use the right tools for the job, but make sure to use the tool as it's intended. For me, these tools make it easier and faster for people to produce production applications. It's a waste of time and therefore a waste of money to constantly be re-inventing the wheel for every project.

  • User profile image
    WhatDoYou​Mean

    @MasterPie: Jump ship to ship, that is exactly what I have done in the past, "many" years.

    Just example: From Pascal to C++ to VB to "Delphi" to C# to what not... see a pattern?

    Imagine if my code was lock-in so much that I couldn't move it from Delphi to C# because Delphi would do so much invisible automagical things that there wouldn't be much visible code at all. All requests get handled automatically. That's all fine and dandy and I DO like it but from a pure business point of view, that is very bad business.

    The same way we left Delphi to .NET, I'm sure in 5-10 years we'll move to something else, so the less "invisible magic", the better.

    Smiley

  • User profile image
    WhatDoYou​Mean

    @kettch:"I could copy and paste that logic into another .NET platform and it would still work" <- There you have it. Could you convert that into Delphi or PHP with such ease? I think not. Which makes it a "dangerous" business decision.

  • User profile image
    kettch

    @kettch: Emergency means, well if you read my other thread you will know what I mean. We are moving away from developing for Windows Clients, THAT is an emergency.

    I don't see how it's an emergency. If your client applications are well written, a lot of the code should be easily portable. Even moving it to back-end services would allow the applications to continue to working, while providing access to other web applications built on whatever platform you want.

    I know I can't just copy/paste code from C# to PHP but the general building of it must be a way so it's "clear" what's going on and all automations should be handled by "us" and not some weird automagical function.

    It's not weird or unclear, it's very simple and it's right there in the documentation.

    For example the MVC Demo, I see a ready made "ChangePassword" function. What the heck? What business would want to use that and get locked-in?

    It's a demo. Somebody already built an account controller that handles those functions, and everything is there for you to modify as you please.

    I find the MVC demo very "un-codey". Hard to explain.

    There's actually a lot of code in there.

    The only aspect I like is the separation but we don't really need Microsoft MVC to separate like that.

    No, you don't need them to do it. However, you'd be hard pressed to find a cleaner and more flexible implementation of the MVC pattern.

  • User profile image
    MasterPi

    @WhatDoYouMean:I don't get it...isn't the fact that you can get a site up and running with less coding (and therefore less mistakes) a good thing? You're effectively reducing time in testing and coding (although there's that initial stride before you begin to acquaint yourselves with the framework). In the end, you haven't lost time or money for the effort that you didn't really put in in the first place.

    Like, if you really need to keep a way out, you'd might as well just write the majority of your stack in assembly (but then, you'd have to prepare for ARM instruction set in case x86 somehow dies off).

     

    Anyway, you could just write an asp.net web service and then write an asp.net mvc app to consume the web service. I think that's a fair way to do it unless anyone else thinks that's a bad idea.

     

     

  • User profile image
    WhatDoYou​Mean

    @MasterPie: It's great to be able to have it up and running in seconds. The same goes with for example Google-"cloud"-anything. But imagine if you were lock-in in a way, you couldn't get your data out with ease from the "cloud". That is bad business eventhough it's a nice and fast start.

    A business must be able to dictate conditions as much as possible not be dictated conditions hence, one must be worried about lock-ins.

    I'm not saying MVC is all evil, don't use it. But I think one should be a little careful. Candy is good but bad for the teeth in the long run.

    Smiley

  • User profile image
    kettch

    , WhatDoYouMean wrote

    @kettch:"I could copy and paste that logic into another .NET platform and it would still work" <- There you have it. Could you convert that into Delphi or PHP with such ease? I think not. Which makes it a "dangerous" business decision.

    Yes, I could convert it to Delphi or PHP with ease. I don't get it. Do you have some magical tool that lets you paste in Delphi and get out perfect PHP?

    Imagine if my code was lock-in so much that I couldn't move it from Delphi to C# because Delphi would do so much invisible automagical things that there wouldn't be much visible code at all. All requests get handled automatically. That's all fine and dandy and I DO like it but from a pure business point of view, that is very bad business.

    Funny you say that. Delphi pioneered some of the first drag and drop data access components that used all kinds of "invisible magic".

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.