Astro js need a backend framework like express js , django or flask? - astro

I know that astro js like a server that can use multiple front-end frameworks such as : react,...., but is astro.js need back-end framework ?
can anyone answer me

No, you don't need a backend framework to run Astro. Basically, for simple projects you don't even have to choose a front-end framework as well, and just use built-in functionality, there is a lot to choose from.
From the docs:
Astro is an all-in-one web framework that comes with everything you need to build a website.
Astro includes a component syntax, file-based routing, asset handling, a build process, bundling, optimizations, data-fetching, and more. You can build great websites without ever reaching outside of Astro’s core feature set.
If you need more control, you can extend Astro with over 100+ integrations like React, Svelte, Vue, Tailwind CSS, MDX, image optimizations, and more. Connect your favorite CMS or deploy to your favorite host with just a single command.

Related

Razor Pages as PWA

I've been diving into Razor Pages, but also have a need to create PWA apps. Everything I see about PWAs are related to Blazor. Can a web application created with Razor Pages be converted to a PWA?
As I know, C# Razor Framework is a Server Rendering framework(SSR), so in any request from browser to server, html is returned. This feature is the opposite of PWA (Client side rendering (CSR)), in which just the first request from browser to server returns html. Consecutive request are performed to the related rest-api or microservice which returns only json
So, in Razor, if you manage to avoid html creation at server layer (which is the core of server rendering frameworks) and perform the forms creation and other UI tasks with pure javascript (like react, angular, vue, etc) instead Razor features, you could convert it to a pwa, adding the classic manifest, service-worker and other required files for a basic pwa application.
If you choose that, you could ask this to your self: Why I'm using a backend (c#) framework just to generate a minimal index.html instead of using the powerful Razor features?
Maybe it is time to move from classic web server frameworks which use server languages (c#, java, python, ruby, etc) to latest javascript frameworks like : react, angular, vue, aurelia, linkstart, etc
Check this resources:
Server Rendering vs Client side Rendering

Rest API and admin in the same application

I'm new to building APIs, I made the first one using an MVC framework: codeigniter, with chris kacerguis rest implementation.
I'm not really sure this was the best think to do because I believe maybe the framework is not that "slim" or light just to API's purposes.
I plan to do a mobile App, an admin and a website so the three can consume the Api's services.
Is it a bad idea to have the API, the website and the admin on the same project? which are the pros and cons? or the best architectural approach?
Otherwise I will have: One Codeigniter project for the API and Another Codeigniter project for website and admin
thanks
You can create folders in "controllers" folder to organize your project and use the same project/env configuration :
controllers/Home.php
controllers/api/MyApi.php
controllers/admin/Admin.php
Edit : You will share models and libraries too.
In my project I realized 2 types of controller - REST and API. Admin js gui work with REST, other world work with API. You can do it simply with silex framework, a little brother of symfony.
The purpose of building a REST API so that you only have to build one project for your business model. This allows you to construct any number of applications on any platform, only requiring you to consume the API in different ways. This essentially separates/decouples the user interface from the business logic, and vice versa.
You should create separate projects for the REST API and each UI project should also be separated projects. This allows you to change the underlying code, language and platform in any one of the projects without breaking any of the other projects as long as the API signatures remain the same.
For example, you could have a live version of your website built using Codeignitor while developing another septate project using AngularJS. When your AngularJS project is complete you would simply swap out the project on your server (or create an entirely new website or server) still allowing you to use the other if required. Additionally, you may decide that you would like to move the API onto a different platform, language or database, develope it and swap the implementation when finished causing no changes to any of your UI projects assuming you have not changed the API signatures.

How should a frontend framework (like Vue/Angular) interact with a backend MVC framework (Laravel/Sails)

We need a restful backend that provides APIs for a mobile app.
We also need a admin website to manage the restful backend.
Right now we have Sails.js as the backend framework, Vue.js as the frontend framework.
I m pretty new to MVC frameworks and I am a little bit confused how should these two frameworks interact with each other:
Should:
The frontend framework lives indepedently (maybe on a separate server), it calls api exposed by the backend framework, or
The frontend framework lives INSIDE the Sails.js, acting as the "views" for the Sails framework
I am not even 100% sure is my question a valid question, I want to know which are the popular ways and is there any pros and cons?
You can do both i.e. keep frontend framework in Sails project as well as separate independent project.
I have done both and I keep following points in mind while making this decision:
If the project is complex enough then its better to create a separate project using some scaffolding tool.
If the project is going to change frequently and evolve on its own then also its better to create a separate project.
If some one time/small view is to be made then I would prefer to keep it part of Sails project
Since you are using frontend framework for admin panel which I think
will be complex, I would recommend you to create separate project on the same server.
You can use yeoman for scaffolding. I have used it for some angular projects and it works great.
Your question is too wide for a single explanation, but the main concept is as per my understanding is data binding.
You can find a lot of free screencasts for starting from scratch, assuming you already know some JavaScript.

Alfresco as App development framework?

I was surfing the Internet where I found an article saying that Alfresco is a Content Management Framework as well as App Development Framework. While I understood it as Content Management Framework, I am not able to know about it as an App Development Framework.I tried researching over it, but could not find anything viable.
I want to know that how Alfresco can be used as an App Development Framework ?
Hi Alfresco has an application development framework, more info here:
Guides: https://community.alfresco.com/community/application-development-framework/pages/get-started
Angular 2 components repository: https://github.com/Alfresco/alfresco-ng2-components
Alfresco App Yeoman generator: https://github.com/Alfresco/generator-ng2-alfresco-app
JavaScript API repository: https://github.com/Alfresco/alfresco-js-api
Some videos:
https://www.youtube.com/watch?v=-OFI3izSDdk
https://www.youtube.com/watch?v=kjOgVbINAyU
In case you want a live support you can use the Gitter channel: https://gitter.im/Alfresco/alfresco-ng2-components
Well, if for App is meant mobile application, Alfresco has a Mobile SDK available for both iOS and Android which can help you create your own application to work against the Alfresco Platform.
Moreover there is another framework called Aikau which has one main goal
The main purpose of Aikau is to provide a library of widgets that can be easily assembled into a web application for accessing an Alfresco repository. The aim is not to replace Share but it was necessary to migrate away from its original implementation, which was based around the Surf paradigms of pages, templates, components and web scripts, towards a solution that provided for rapid development and customization.
This feature was first introduiced in Alfresco 4.2 and then extended in Alfresco 5.0
If you want to build applications for Alfresco you have a number of options available to you - as mentioned you can build mobile applications (and there are SDKs available to do this).
If you want to build web applications then you have the option of either customizing the default Alfresco Share client (which is built on top of the Alfresco Surf framework using a combination of YUI 2 and Aikau). Alternatively you can built your own web client by building a new client with the Maven Aikau Archetype.
The advantage of the Surf framework is that it takes care of Alfresco authentication across all the various APIs (WebScript, CMIS, Public API, etc) as well as providing lots of security benefits (CSRF, XSS white-lists, etc).
The advantage of using Aikau is that it provides a large number of out-of-the-box widgets that are specifically designed to work with Alfresco data and address Alfresco (ECM) specific use cases.
You are of course not limited to these options - you can build an application on top of any stack you wish, but ultimately you will want to be making use of the REST APIs that the Alfresco Repository provides.
Depending upon the application you are building you may also want to build custom data models and build in workflow via Activiti BPM as well.

Recommendations for a Full-stack Framework for REST?

I am looking for a robust REST framework to eliminate all that boilerplate code with starting up a new REST-only web service (mobile clients). Is there a framework that already has this built-in where I could, for example, simply build the domain models and run with it? I would like to see:
Authentication & User Model
Logging
Basic CRUD
Permissions (for model access)
Scalability
It seems every web service at a minimum needs the above capabilities. Somebody, somewhere must have written a good re-usable framework with the above capabilities. Any ideas? I would prefer Node.js, Java or even hosting with a PaaS service provider that offers these features.
Spring 3 MVC provides a very nice and simple annotation based framework for REST.
See http://blog.springsource.org/2009/03/08/rest-in-spring-3-mvc/ it can be deployed on any java web server like Jetty or Tomcat.
A framework like XAP provides a combined solution of Spring and Jetty plus it's built for dynamic scaling.
See http://www.gigaspaces.com/xap.
Last if you want to easily on board this solution on any cloud CloudifySource provides an open source project which includes XAP capabilities and PaaS.
See http://www.cloudifysource.org
I use Symfony 1.4 for this. It is an PHP framework. It generates most of what you need for free. The database stuff is also quite easy as the Symfony uses ORM libraries (you can choose but I can recommend Doctrine: http://www.doctrine-project.org/).
For example the whole backend site(admin) generating is a matter of running one command. They have a great e-book fro free. More info here:http://www.symfony-project.org/.
There is also Symfony 2.X (http://symfony.com/), which have a lot of new features (e.g. new Doctrine 2.0). Especially with the bundle (plugin) https://github.com/FriendsOfSymfony/FOSRestBundle is the RESTful service quite easy.