Functional programming based user interface

I am learning the concepts of functional programming now days, and professionally I am an Asp.net developer. But asp.net forces you to change the properties of objects in your code too often. Functional programming is based on immutable objects. And applying this concept to change the value of a text field will be very painful. Also, in some cases, handlers, such as the FormView ItemInserted arguments, become available to the developer, such as KeepInInsertMode, which the developer can change to true / false, in which case we modify the input arguments that contradict FP. Your thoughts frnds. What is the right way to handle user interfaces in the software world? FP or OOPS.

+5
source share
2 answers

You are asking for the “right” way, but this is an engineering problem, not a mathematical problem. There are trade-offs, some form of taste comes into play, and it is unlikely that there is a uniform solution perfect.

In addition, only because asp.net does something in a certain way, does this mean that all OO structures have made the same design decisions. Check out Ruby on Rails or Smalltalk Seaside for a different but still OO approach. Even ASP.net MVC, for example, takes a slightly different approach than vanilla ASP.net.

FP- , , - , , OO-. , ( ), Links ( - LINQ) LiveLab - .

, , ...

+2

-: , " , ", : .

" " .

state → event → state, , , , OO ", ".

.

+2

All Articles