Are functional languages ​​and programming models such as MVC the next big fad?

Recently, I have heard a lot of good things about functional programming languages ​​such as F #. Also [and not connected], I also notice that MVC is starting to get a lot of information - possibly since the advent of Silverlight / WPF.

I was never one of those who jumped on the bandwagon without preliminary research - in fact, it took me a little time to take a jump in .NET. Someone just commented on one of my previous questions about the beginning of the adoption of new technologies, and this made me stop and think.

I fought to find time to learn WPF, but now I'm starting to wonder if this is so. Are there languages ​​like F # and the MVC programming model, or are they just another quirk? Or do people really see them as a potential replacement for C # / VB and OOP?

Most of my developments are in home applications or as rich web applications for deployment to intranet applications or winforms for distribution on separate machines. My selection technologies have so far been pretty standard - T-SQL / PL * SQL, C # / VB, JavaScript / AJAX, CSS.

I guess I'm trying to determine which combination of these technologies will be most productive / useful for my toolkit in the near future?

+4
source share
11 answers

None of them will come, and in the near future they will not leave, but in fact I expect to see only one of these two in normal use by most .NET developers ...

There is a big difference between F # and ASP.NET MVC; F # is a functional language - this has several advantages in several scenarios, but for most business areas programming a general-purpose language such as C # is usually more convenient. Nevertheless, much can be gained from knowledge of the functional style of programming (especially repeated immutability). I looked at F #, and I hope this improves my C #, even if I never write production code in F #. Fortunately, thanks to delegates and lambdas, C # can be used functionally, even if it's not formally FP.

ASP.NET MVC, however, is a completely different beast; MVC (more generally) is a well-known, established and reliable template that:

  • significantly improves presentation level testability
  • makes logical separation of problems at the user interface level
  • provides more direct access to the basic HTML page of the page
  • and much more (model binding, etc.).

Or in another way: for many people, this makes ASP.NET completely understandable; I fully expect to make a lot of use of ASP.NET MVC next year.

+14
source

It is very strange for me to comment on functional programming and MVC in one question; I believe that they are in no way connected with each other, except that they are over 30 years old and have established themselves very well in their communities. Since I know something about functional programming, I will talk about it.

Functional programming is almost 50 years old, and it should remain, although it is unclear whether it will ever become popular. It is clear that functional languages ​​act as incubators, and then prove the foundations for functions that ultimately find their way into the main languages. Some examples:

  • Garbage collection
  • Closing functions of the first class (added in Perl in 1995 in all scripting languages ​​since then, present in Smalltalk-80, emulated in various ways in Java and C #)
  • Parametric polymorphism (patterns in C ++)

Ultimately, the functional methods in your tool will make you a better programmer. Or, as Eric Raymond says, learn Lisp. (Both Lisp and Haskell are loaded with powerful new ideas that will make your head explode in different, incomparable, but useful ways. F # is rather a combination of the best proven ideas from functional languages ​​that marry the .NET platform. At the beginning of 2009, he there seems to be a better chance of becoming mainstream.)

+8
source

I have seen so much in SO these days. (Here, here , and here for a few examples.)

According to Wikipedia , Lisp is the second oldest programming language that is still in use today (knocked out by Fortran). Functional programming is nothing more than a quirk than a transistor, mouse, computer monitor, hard drive, or indeed the very concept of a personal computer, none of which were at the beginning of Lisp in 1958. It is true that functional programming may not be particularly useful in a typical business environment, but its waxy and diminishing levels of popularity do not make it a fad or make it a toy. Programmers with a strong appreciation of computational science understand that functional programming is not so much an invention as a discovery - a deep understanding of the fundamental nature of computing.

As for your question, if programming is your day job (as opposed to true passion), is F # a waste of time? Probably in the sense that it is unlikely to ever become popular enough to guarantee, among other things, your resume. It is also worth noting that if you spend time studying F #, but none of your colleagues can understand your work, you can do more harm than good by choosing it as a development tool. This still does not make it a "fad." :)

As for MVC, it has been a long time, perhaps more than a decade, but I am not tracking. This is not a silver bullet, and it is difficult to understand; it is just another development model. It is also worth noting that MVC is not a standard or even a very well-defined technology. There are many different ways to interpret MVC, and I would even venture to say that there is more than one correct way to do this.

MVC is especially useful for web development because web applications have very dirty external code (supporting all of these browsers is a real pain), and the last thing you want is to get your business logic bogged down with an interface unnecessarily. Unlike F #, learning MVC is not a waste of time, even if programming is just a one-day job for you, because if you ever work on a web application, adhering to MVC (even just adhering to it) can save your ass from professional embarrassment.

+6
source

As for MVC, it was introduced in 1979. I remember that for the first time in my career I worked at Aldus Persuasion for Windows (a one-time Powerpoint competitor) in 1988/89. MVC frameworks are all the rage in RIA applications such as Adobe Flex-based web programming (Cairngorm, Mate, PureMVC, etc.).

At my company, our first Flex application was not executed as MVC, but we had several views in the model. It must be a mess. We reorganized MVC, and life has become better for developers.

As far as I can tell, only people who are trying to implement server side MVC through any of the various web frameworks that are complaints about MVC. The Fallalies of Distributed Computing would inform them that it was a bad idea to do MVC, where the rendering rendering layer is separated from the bay by the network connection. Distributed MVC is just as bad as distributed objects.

With RIA web applications such as Flex, MVC runs exclusively on the client side - just as it was introduced on Smalltalk graphics workstations back in '79. RIA clients use only asynchronous service calls and / or messaging to communicate with the server side.

For an application that did nothing but threw out one form of CRUD, then yes, MVC might be redundant. But for rich GUI applications that have complex complexity, MVC can remain a very reasonable model for adoption.

+4
source

The practical use of functional languages ​​in development code depends entirely on which domain you are coding for. As stated in other answers, for classic business-to-business applications, if you already know C #, you are unlikely to switch to F # soon.

BUT:

  • Not to use it in the development code does not mean that it cannot be useful elsewhere (data analysis, for example, prototyping algorithms without coordination in OO noise)
  • Learning a functional language will teach you another way to think about coding, which is likely to be useful for your C #
  • Learning a functional language will also give you a better understanding of the functional aspects of C #
  • To complete my list - although this has been repeated and repeated elsewhere in SO - no one assumes that F # will replace C #, this is another tool in this field. Buying this tool may be too expensive if you don’t need it right now, but at least you should try to understand what it is doing on the day that your current toolbox is not enough.
+2
source

No, they are not quirks. And no, people do not consider them a potential replacement for C # / VB and OOP. People will use them if they save time or money.

I think you need to make the escape jump challenge and see what other smart guys expect, or close your eyes and hope that the storm passes in a few years. Some technologies will adhere, while others will not. MVC is as old as OO and functional programming is as old as programming.

+1
source

Not at all.

Functional programming languages ​​have been around for several decades.

Programming models are like “MVCs,” which are actually a design pattern, and many models have been using it for several years now.

Probably the only new thing here is your perspective. You did not know that they exist, or they were so widespread until you came to the MS world.

My first job was to use the Apple comp WebObjects Framework in 2000. It is very easy to develop with him.

+1
source

Functional programming has many advantages as a paradigm: It offers many of the same advantages as an object-oriented design when working in small groups (data encapsulation, polymorphism, code portability ...) It is less error prone due to data immutability and statelessness. Easier to scroll.

+1
source

I will not talk about the viability of web applications for MVC ... for those of us who develop frameworks that have defined clear patterns - this is just another way to fool the same cat. I never fought for the big picture of ASP.NET, so thinking that MVC somehow simplifies it is often wrong. This may be useful for one approach, but not for all approaches - thus, it drops to another tool in the toolbar.

Do we need another tool?

+1
source

I'm sure C # and VB will be there forever ... but there will also be many people working on the brink of new technologies. They can do more with less code, and you can do more with the code you already have. So don’t worry, it will be an honest fight.

Even that ... learning more materials makes you better program like that ... its up to you!

what I am saying is that theres a lot of fuzz about how learning more languages ​​knows what each language is capable of, and then use all this information to create better code. But if you spend the same time dominating the language, your gona will be fine.

0
source

From the (extremely) basic knowledge I have functional languages ​​- they MAY have a high place in our future as developers. Many smart people commented on the fact that since processing processes are not accelerating, more cores must be used. Thus, concurrent programming will become more popular. Functional languages ​​are suitable for parallel tasks because they do not support state (effectively eliminating most of the common problems associated with parallel programming / threads, such as locks, etc.).

For more information about this particular point, I would like to direct you to this article , which discusses mutable / immutable data and compares C # and f # code snippets.

0
source

All Articles