Forum > Networking and Web Programming

Opinions on Fano Framework

(1/3) > >>

kveroneau:
I just noticed a new web framework on the wiki when taking a look at the web programming pages there.  I did a search on the forums, but it doesn't seem that anybody is actually talking about it.  Is there a reason why?  Does anybody here use Fano and if so, what are your experiences with it?

At first glance, the Fano Framework website is very modern and professional.  However, it's not until you dive into some of the documentation that things got a bit more dire for me.  For example, the Hello World example I followed used the Fano CLI(which I assume is a new addition), this Hello World example was super limited in showing the actual framework and is more to show off the CLI.  Now, the other Hello World example doesn't use the Fano CLI, but instead does project creation and management from scratch, but shows how to use query parameters and even create a working view.  The Fano CLI Hello World should also go through the same steps of creating a controller to grab query parameters and the creation of the view.  That's all I'm saying.

Other parts of the documentation are also clearly unfinished making me believe that this framework was only just released within the last year or so.  Makes me wonder how production worthy this framework might actually be.  Has anybody fully tested this framework or built something using it?  If so, please share.  The Docker deployment page has a link, but the page itself is literally blank, which was both a tease and a disappointment.  Then when I saw a tutorial page for "CRUD" that got me excited for a very promising tutorial, then I was met with this disappointing page: https://fanoframework.github.io/tutorials/creating-crud-application/

I've only learned of Fano Framework's existence as of yesterday and actually lost sleep because I went to bed later as I was curious about it.  At first glance, it shows a lot of promise.  Has modern features that remind me of both Django and Ruby on Rails.  It seems like it has the potential to be a killer app for web development for ObjectPascal, but parts of the documentation make it seem unfinished.

Something else to note, which may not bother everyone, is that it lacks any Lazarus integration.  It's almost like the developer didn't even know of Lazarus' existence when building the framework, or just doesn't like Lazarus.  I like using Lazarus as an editor and project manager for any ObjectPascal program, as it has some really nice features that assist in developing applications.  I guess I could say that one of the driving forces for me using ObjectPascal is due to how well Lazarus works as an IDE for any application type, and not just LCL applications.  I use Lazarus extensively for packages, a huge library of common classes and methods I use in a lot of my projects uses a personal package I have.  It doesn't appear that Fano even ships an lpk file to assist with using it's framework within a Lazarus project.  It seems the developer really wants to push their Fano CLI, which isn't bad, reminds me of Django's "manage.py", but for ObjectPascal development, I guess I've just gotten so used to using Lazarus' project management features.  Technically, Fano CLI could manage a Lazarus project, which would allow a developer to open their project with ease in Lazarus for development, but still use the CLI to do specific things.  Maybe there is a command-line option for the Fano CLI to generate Lazarus project files, still didn't look at every option yet.

Leledumbo:
The author is in this forum, feel free to contact him directly as I don't see him online here often.
To be fair, though, among all existing web frameworks, this one has the most documentation. Its CLI is indeed one of its main offering, to attract people with Yii, Laravel and Rails experience, among others. I'm not a fan of the code generator approach, as well as the convention where routing is put in a single file. I prefer fpWeb standard approach, where routes are in controller's unit initialization section but this is highly subjective.

kveroneau:
Thank you for your response.  I have been seeing a lack of documentation for many FreePascal/Lazarus projects/packages unfortunately.  It has led me to reading the code to better understand how it works and what calls to make.  However, I am used to this.  Even when I was using Python full-time, although many projects are super well documented, I still found myself scanning through the code to better understand how it all works.  Also looking at other people's code can be very inspiring if written well.

However, the lack of documentation in these areas could be a valid reason why the ObjectPascal userbase hasn't really grown.  As not everybody is willing to deep dive into someone else source code to learn how stuff works, and would rather read a document from readthedocs.io instead.  I'm not really good at writing documentation, or I'd help out with this.  I do plan on starting a new blog soon, in similar vein to my older http://www.pythondiary.com/ blog I worked on when I was using mainly Python for everything.  The entire blog site was written from scratch using the Django framework, so it was a great way to also learn more about Django.  I am thinking of doing the same with my Pascal blog, where the blog itself is also entirely written entirely in Pascal to showcase the language while readers read about it.

Oh, and I do believe when I searched for Fano online, a post from your blog Pascal Warrior did come up in the results.  Pascal as a language does need more active blogs out in the wild to churn up more search results and to gain more interest in the language in general.

PierceNg:
I played with Fano a little. Below IMHO.

Fano first requires building a CLI tool.

The getting started page says "Fano Framework has no opinion about your project directory structure. You can structure your project directories and files the way you like. However, Fano CLI creates several files and directories that follows certain assumptions."

So Fano doesn't have an opinion on the folder structure. But Fano does have an opinion on the folder structure.

Getting started also requires setting up Apache, mod_Xcgi and root access for setting up virtual hosting. That's just too much to ask for up front. Who sets up CGI just to try things out these days?

CLI is good for showing off "go from git cloning this repo to having a running hello world web app in 1 min, with source code templates for routing, controllers, views, models and so on all set up". But the Apache requirements totally get in the way. The framework should just run a Pascal web server directly to serve the web app being built.

Leledumbo:

--- Quote from: PierceNg on September 22, 2021, 04:53:01 am ---So Fano doesn't have an opinion on the folder structure. But Fano does have an opinion on the folder structure.

--- End quote ---
The framework and CLI must always be clearly stated then. Although it's rather unconventional to have a framework without any particular structure.

--- Quote from: PierceNg on September 22, 2021, 04:53:01 am ---Getting started also requires setting up Apache, mod_Xcgi and root access for setting up virtual hosting. That's just too much to ask for up front. Who sets up CGI just to try things out these days?

CLI is good for showing off "go from git cloning this repo to having a running hello world web app in 1 min, with source code templates for routing, controllers, views, models and so on all set up". But the Apache requirements totally get in the way. The framework should just run a Pascal web server directly to serve the web app being built.

--- End quote ---
Indeed, the fpWeb way of getting started is as simple as:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses  httpdefs,  httproute,  fphttpapp; procedure HelloHandler(ARequest: TRequest; AResponse: TResponse);begin  AResponse.Content := 'Hello, World';end; begin  HTTPRouter.RegisterRoute('/', @HelloHandler);  Application.Initialize;  Application.Port := 9876;  Application.Run;end. then simply compile and run normally, nothing else necessary.

Navigation

[0] Message Index

[#] Next page

Go to full version