Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you explain that purely functional web servers like Ring and Yesod are not MVCs? [closed]

Traditionally people think of web applications as an MVC - which assumes an Object Oriented context.

Functional programming critiques this - and offers a model using higher order functions and immutable data structures.

My question is: How do you explain that purely functional web servers like Ring and Yesod are not MVCs?

like image 971
hawkeye Avatar asked Nov 28 '22 20:11

hawkeye


1 Answers

l will try to answer this with respect to Yesod.

How do you explain that purely functional web servers like Ring and Yesod are not MVCs?

Yesod is not a web server. Yesod is a web framework. warp is the recommended web server for using alongside Yesod.

How do you explain that purely functional web servers like Ring and Yesod are not MVCs?

That's not necessarily true. You can use the templates as view, persistent as model and routing and handing as Controller. In fact, the scaffolding site loosely follows the MVC approach.

Functional programming critiques this - and offers a model using higher order functions and immutable data structures.

This has nothing to do with this MVC. MVC is just a design pattern. Higher order functions and immutable data structures doesn't stop you from following some architecture or a design pattern.

like image 122
Sibi Avatar answered Dec 05 '22 08:12

Sibi