The Status of SEO with languages as Angular and React? - javascript

I'm thinking of using Angular or React for a new web project but the SEO are an important part. From what I have read there are ways to solve it but it always results in keeping two page version alive or using an external service that renders the pages.
This sounds like bad options to me?
I have also read some unclear info about that search engines now can read javascript webpages with for example angular or react?
Could someone clarify this for me? Will SEO be as good with Angular as if I was using, for example, ASP.NET MVC?

Can't speak for Angular but React.js is perfect for SEO. The reason is that every state of your application can be fully rendered server side.
So this is not like your traditional ajax page where you have your base view and then do some ajax/javascript stuff to go to the next state.

Related

Connecting the components in Angular

I'm trying to develop a website in Angular. My website happens to be a Multi-Page Application (MPA), where different pages have been developed as different components. I have developed those pages of the website, I was just wondering how can connect those components/pages together like on a button click, the user should be directed to another page, etc.
Also, it would be really great if anyone could provide any references to some resources or tutorials where they teach us how to develop Multi-Page Application (MPA) with the help of Angular. I searched online for quite a while and didn't find anything since Angular is mostly used for Single Page Applications (SPA).
Any help would be highly appreciated. Thanks!
In your scenario it is really important to have some kind of state saving as a SPA does lose its state on hard reload i.e. CTRL+R.
A common approach would be the use of the localStorage to preserve your data that you need to restore the state, but the downside of it is the security as it can be viewed from the devtools.
Another approach would be the use of cookies which requires a backend. I think this is straight forward and commonly asked how to implement cookies.
That's the same approaches how other SSR (server side redered) pages are handle its state.
Additionally:
I think I kinda guessed your problem as you just have different component on different routes. Angular is a SPA, but this does not mean it cannot change the route. It will change the route, but without reloading the browser. There you can reach other components. More about that I would recomment to read this Tour of Heroes example:
https://angular.io/guide/router

Using ASP.NET MVC or Web API 2 backend + Angular for dashboard platform

I am trying to create a web-based dashboard platform and framework. The techniques I think about using is either ASP.NET MVC 5/6 (backend and frontend integrated) or a ASP.NET Web API 2 backend and an Angular frontend.
The application should function as an application (host), but also as a framework in which applications can be made. An application in this case is a small web application which can be shown on the dashboards. One of the main bottlenecks I came across is figuring out a way to instantiate the same application multiple times on a dashboard. Since by default doing this introduces ID collision between multiple HTML elements on the web page.
I know Angular kind of 'solves' this problem for you since the scope of your application (looking at an application like it's a component) is maintained by the Angular framework. The reason I mention ASP.NET Web API is because I'd then like to use this as a backend where all the configurations of the applications is stored.
ASP.NET MVC does not (as far as I know) allows you nice ways to handle this, except for rendering the HTML on the server and replacing all HTML ID's to something unique. But even when you manage to do that, you still have the issue of your js files referring to the old not-unique HTML elements. This could then maybe be fixed by using a JS framework that allows you to do such thing.
The reason I ask this question is because I have a lot of experience in the .NET framework and very little experience using Angular. The choice for Angular seems more suited for this use case, but due to my lack of experience in Angular, I am not able to make an arguable choice. I have some experience in ASP.NET MVC specifically, but not enough to also think of a nice way of handling the ID collision issue.
Therefore my question to you, the StackOverflow community, is do you have any experience using any of these frameworks? And if so, what would you choose and why do you think the choice is better suited for the job?
Use angular 2 (or 4) and webapi. Through use of components and parameterized directives, that can solve it. If you need good authentication, that will have to be dealt separately.

Single page application vs Full stack

I am mostly lost in this particular topic.
I want to develop a full stack app with Rails using sqlite 3 as back end now that is good and all, but as a comparison to that full stack app i need to do a single page app. I have no single idea how single pages work? How do you talk to the database, do you use MVVM as a architecture? Were does single page differs from stack? I have a lot of questions if someone could describe in detail what single page app is in reality i would certainly be grateful.
If possible to describe sort of the tools needed for a single page do you need just Angular js and MongoDb and you are good to go? Can you implement ajax? Please I know that it is a total newbie question but i haven't found any real detailed resource about the differences of full stack vs single page.
Ruby on Rails has now an API only mode.
For the UI I would use a JavaScript MVC framework such as React.js or something like Angular
Both links here are for a back-end API built with Rails.
There is no versus between single page and full stack. A single page can consist of multiple stack eg. Front-end, Back-end.
Angular JS is one of the most reputed framework for MVC to create a single Web App. You can use ajax too easily with build in Angular JS service.
Take a look into React.js, GraphQL, Relay stack for building single-page apps (used at Facebook). Here is a a nice starter kit which may help you to get started: https://github.com/kriasoft/react-starter-kit (disclaimer: I'm the author)

Possible Web Framework to Use in Existing Application

I work for a medium sized company that has an application used by a few thousand people and is built primarily with HTML,Javascript, aspx, xml, xsl, and runs on IE 11. This application is proprietary and not designed in house but we have access to the code for possible modifications and its just sitting out there on the server(s). A new project has come down the pipline for an enhancement\adjustment to be made to a particular area of the application and I'm wondering what kind of web framework I could use to do this work. I am really just needing to call an enterprise service and get data back, display it, and that's about it, so its not incredibly hard. I am worried though about how to integrate it with the existing application.
I am not sure how this scenario would go:
User navigates to page A inputs data, I want that data to go to a controller or something I built, fetch info and send it back to page A. I was thinking of using Spring MVC but not sure. Any feed back or suggestions would be greatly appreciated! I know this question doesn't include code, so please don't hate me.
Thank you.
From a very high point of view and with no knowledge about any specific requirement.
If you have already an application developed in ASP.NET, it's better that you continue the development of the new module of the application on the same platform.
If you want to develop a new module (actually a new web app) that looks like the old application but with a totally different platform like Spring MVC (could use any other), you can reuse the existing css styles and databases.
For integration purpose you could modify the original application in the menu(or links) that redirects you to the new module and implement a single sign on server (this will required work on both applications) to made the transitions smoothly between both applications (something like a portal style). Note that they will have a different context application path.

Angular/React - Where do they fit in?

I would like to start looking into Angular or React, but I'm having a hard time at the minute figuring out where they fit in?
I currently build all our sites using PHP based Expression Engine or Craft CMS. Is it possible to use Angular or React with these? Would I be correct in thinking they act as the whole front-end?
So for example, would I use EE/Craft to just create the API's to fetch/post data, and then Angular/React would generate the pages using the data from these calls?
That is exactly what I would do. I am not overly familiar with the CMS frameworks you are using, but do have a good bit of experience with CMS development. Typically I leverage the provided APIs to bring the data to the presentation layer, and then use a JavaScript framework such as Angular to create my UI.
This approach will work great if you can get away with not using any of the CMS server controls, and perform all data operations through API calls.
Using a CMS for your data as an API is fine, but you might be better off with something custom made (like a rails or nodejs project). CMS's are not ideal if you're are building just an API. Typically, you'd built your React/Angular website as a static website that you can deploy to a hosting provider (like S3 or Github Pages), this gives the immediate benefit of improved security, speed and scalability. From your static React or Angular site you then leverage your server-api's to fetch the data.
However, this only fixes the data problem, not the content management problem. Since you have a static site, there is no way for your content editor or marketers to be able to change the content on your website. Everything has to be done in the source code - by a developer. You can fix this by adding a drop-in content management solution like INSTANT on top of your static website. Without any coding, it allows anyone with an account to change content directly on the website.

Categories