跳转到主要内容

标签(标签)

资源精选(342) Go开发(108) Go语言(103) Go(99) angular(82) LLM(75) 大语言模型(63) 人工智能(53) 前端开发(50) LangChain(43) golang(43) 机器学习(39) Go工程师(38) Go程序员(38) Go开发者(36) React(33) Go基础(29) Python(24) Vue(22) Web开发(20) Web技术(19) 精选资源(19) 深度学习(19) Java(18) ChatGTP(17) Cookie(16) android(16) 前端框架(13) JavaScript(13) Next.js(12) 安卓(11) 聊天机器人(10) typescript(10) 资料精选(10) NLP(10) 第三方Cookie(9) Redwoodjs(9) LLMOps(9) Go语言中级开发(9) 自然语言处理(9) PostgreSQL(9) 区块链(9) mlops(9) 安全(9) 全栈开发(8) ChatGPT(8) OpenAI(8) Linux(8) AI(8) GraphQL(8) iOS(8) 软件架构(7) Go语言高级开发(7) AWS(7) C++(7) 数据科学(7) whisper(6) Prisma(6) 隐私保护(6) RAG(6) JSON(6) DevOps(6) 数据可视化(6) wasm(6) 计算机视觉(6) 算法(6) Rust(6) 微服务(6) 隐私沙盒(5) FedCM(5) 语音识别(5) Angular开发(5) 快速应用开发(5) 提示工程(5) Agent(5) LLaMA(5) 低代码开发(5) Go测试(5) gorm(5) REST API(5) 推荐系统(5) WebAssembly(5) GameDev(5) CMS(5) CSS(5) machine-learning(5) 机器人(5) 游戏开发(5) Blockchain(5) Web安全(5) Kotlin(5) 低代码平台(5) 机器学习资源(5) Go资源(5) Nodejs(5) PHP(5) Swift(5) 智能体(4) devin(4) Blitz(4) javascript框架(4) Redwood(4) GDPR(4) 生成式人工智能(4) Angular16(4) Alpaca(4) 编程语言(4) SAML(4) JWT(4) JSON处理(4) Go并发(4) kafka(4) 移动开发(4) 移动应用(4) security(4) 隐私(4) spring-boot(4) 物联网(4) nextjs(4) 网络安全(4) API(4) Ruby(4) 信息安全(4) flutter(4) 专家智能体(3) Chrome(3) CHIPS(3) 3PC(3) SSE(3) 人工智能软件工程师(3) LLM Agent(3) Remix(3) Ubuntu(3) GPT4All(3) 软件开发(3) 问答系统(3) 开发工具(3) 最佳实践(3) RxJS(3) SSR(3) Node.js(3) Dolly(3) 移动应用开发(3) 低代码(3) IAM(3) Web框架(3) CORS(3) 基准测试(3) Go语言数据库开发(3) Oauth2(3) 并发(3) 主题(3) Theme(3) earth(3) nginx(3) 软件工程(3) azure(3) keycloak(3) 生产力工具(3) gpt3(3) 工作流(3) C(3) jupyter(3) 认证(3) prometheus(3) GAN(3) Spring(3) 逆向工程(3) 应用安全(3) Docker(3) Django(3) R(3) .NET(3) 大数据(3) Hacking(3) 渗透测试(3) C++资源(3) Mac(3) 微信小程序(3) Python资源(3) JHipster(3) 大型语言模型(2) 语言模型(2) 可穿戴设备(2) JDK(2) SQL(2) Apache(2) Hashicorp Vault(2) Spring Cloud Vault(2) Go语言Web开发(2) Go测试工程师(2) WebSocket(2) 容器化(2) AES(2) 加密(2) 输入验证(2) ORM(2) Fiber(2) Postgres(2) Gorilla Mux(2) Go数据库开发(2) 模块(2) 泛型(2) 指针(2) HTTP(2) PostgreSQL开发(2) Vault(2) K8s(2) Spring boot(2) R语言(2) 深度学习资源(2) 半监督学习(2) semi-supervised-learning(2) architecture(2) 普罗米修斯(2) 嵌入模型(2) productivity(2) 编码(2) Qt(2) 前端(2) Rust语言(2) NeRF(2) 神经辐射场(2) 元宇宙(2) CPP(2) 数据分析(2) spark(2) 流处理(2) Ionic(2) 人体姿势估计(2) human-pose-estimation(2) 视频处理(2) deep-learning(2) kotlin语言(2) kotlin开发(2) burp(2) Chatbot(2) npm(2) quantum(2) OCR(2) 游戏(2) game(2) 内容管理系统(2) MySQL(2) python-books(2) pentest(2) opengl(2) IDE(2) 漏洞赏金(2) Web(2) 知识图谱(2) PyTorch(2) 数据库(2) reverse-engineering(2) 数据工程(2) swift开发(2) rest(2) robotics(2) ios-animation(2) 知识蒸馏(2) 安卓开发(2) nestjs(2) solidity(2) 爬虫(2) 面试(2) 容器(2) C++精选(2) 人工智能资源(2) Machine Learning(2) 备忘单(2) 编程书籍(2) angular资源(2) 速查表(2) cheatsheets(2) SecOps(2) mlops资源(2) R资源(2) DDD(2) 架构设计模式(2) 量化(2) Hacking资源(2) 强化学习(2) flask(2) 设计(2) 性能(2) Sysadmin(2) 系统管理员(2) Java资源(2) 机器学习精选(2) android资源(2) android-UI(2) Mac资源(2) iOS资源(2) Vue资源(2) flutter资源(2) JavaScript精选(2) JavaScript资源(2) Rust开发(2) deeplearning(2) RAD(2)

Why is Angular Universal so lackluster?

After working with Nuxt.js and Next.js, which are frameworks that are focused on SSR, SEO or a hybrid SPA approach, it baffles my mind that Angular's offer to solve the same problem is Angular Universal. It has one page of documentation on the official site and developing for it seems to be a very big challenge. Has anyone here actually built a production app with Angular Universal? What are your thoughts on this?

https://www.reddit.com/r/Angular2/comments/rv0i1t/why_is_angular_universal_so_lackluster/

 

User avatar

level 1

eneajaho

·1 yr. ago

I have used it to build several apps that are in production and it has worked just fine.

It wasn't a big challenge working with it.

The installation schematics did almost all the job.

If you open the angular universal github repo you'll find a lot of information about it.

11

User avatar

level 1

mamwybejane

·1 yr. ago

Practically all apps I have built with Angular are backoffice apps, where the initial load time is not mission-critical.

Out of curiosity I've looked into Angular Universal a couple of times over the years but always gave up since the added complexity was of completely no benefit to the (my) end user.

The back office user is not going to close the application because he has to wait for 5 seconds, as opposed to opening an online shops where these miliseconds count.

Angular is awesome for what it is targeting (enterprise apps), but (imho) not great for landing pages.

18

 

level 2

vicmarcal

·1 yr. ago

Load time is awesome fast ifusing LazyLoading correctly, and a proper Module architecture. Angular has a “first time paint” faster than any SSR alternative because it will start pulling data in the eyes of the User, instead of rendering and serving. If it is taken for you ages, please review the architecture of your Angular app and the quality of your backend APIs ( if data is taking ages to be served through REST Apis). The main problem, and the reason of Angular being used as Office, Governments, non-SEO websites is because the bad SEO an Angular app has.

3

User avatar

level 2

DanteIsBack

OP·1 yr. ago

Yes, that's the general problem with SPA apps. But even React and Vue.js created Next.js and Nuxt.js to get around that issue, so I think it would only be natural that Angular could provide something of the same kind and quality.

5

 

level 3

TScottFitzgerald

·1 yr. ago

The issue isn't with SPAs alone but with who the frameworks are targeted towards. From the image I get, Angular clientele tends to be B2B where SEO/UX aren't that critical, so I assume they don't devote that many resources there.

The Angular team seems to be pretty spread thin sometimes so I think they just focus on the stuff most needed by the dev community.

10

User avatar

level 3

brandonlee781

·1 yr. ago

Actually I think this might be the difference. Next and Nuxt are community projects with their own teams developing them on top of React and Vue. Angular Universal is handled by the Angular team (or maybe a sub-team, I don't know.)

2

 

level 4

LowB0b

·1 yr. ago

Angular universal was the brain-child of like one dude (patrickjs) dating back to 2016.

https://youtu.be/TCj_oC3m6_U

3

 

level 1

cactussss

·1 yr. ago

In my experience Angular Universal is pretty straight-forward. Have you actually tried it or you just went to the docs site and thought it's too hard?

What exactly seems like a big challenge to you? Specifics...

3

User avatar

level 1

Auxx

·1 yr. ago

My thoughts are that you don't need it at all. Angular is for Single Page Apps, you don't SEO apps. If you want an indexable public web site, don't create a SPA, just create a freaking web site!

4

User avatar

level 2

redfournine

·1 yr. ago

And... you still need a framework to build a website. Which comes back to either one of Angular/React/Vue (intentionally leaving out Svelte, Ember, etc for simplicity).

How else do you create website without these framework?

3

User avatar

level 3

Auxx

·1 yr. ago

You don't need frameworks. But even if you want one, you should use the backend framework, like Nest.js or Spring.

3

User avatar

level 3

jiggity_john

·1 yr. ago

Somehow the Space Jam website existed in 1996, long before angular 1 in 2010 and react in 2013.

3

User avatar

level 4

redfournine

·1 yr. ago

This is like asking people to build everything with assembly. Just because you can doesnt mean you should.

5

User avatar

level 5

avwie

·1 yr. ago

Just because you can doesn’t mean you must either. For a regular old normal website, front end frameworks can be overkill. Something like Flask or Express on the other hand, to handle routing and templating is not that strange.

1

 

level 3

TScottFitzgerald

·1 yr. ago

You don't necessarily need frameworks, even Google/Alphabet doesn't use Angular for most of its popular websites. And to be pedantic, some of those are frameworks and some libraries.

You can just build a site with HTML, JS (using libraries or vanilla JS) and Webpack or something similar. It would most likely be harder, but you can.

But more to the point, you can also build a website/MPA with most of those frameworks you mentioned. Again, it would most likely be harder since most of them are designed around SPA, but you can.

1

User avatar

level 3

avwie

·1 yr. ago

You know you can make a website without frameworks right?

1

 

level 1

Toddwseattle

·1 yr. ago

Is there a good angular static site solution? Agree universal doesn’t deliver based on my experience. In the process of recreating my personal website with gatabyjs (which nicely uses react) to transition an angular landing page I currently use. Its nice how it leverages the react component model.

3

User avatar

level 2

illenium2k

·1 yr. ago

Maybe take a look at this: https://scully.io/

6

User avatar

level 1

sanjayatpilcrow

·1 yr. ago

...and with localization it's a different beast. I don't think I could tame the Google SEO as much as I wanted to with multiple languages. I did have some strategies to circumvent the issues but haven't got the time to implement them.

3

 

level 2

joel_vic

·1 yr. ago

I have the same problem with mu ecommerce website. Still haven’t figure out the best solution for that…

1

User avatar

level 3

sanjayatpilcrow

·1 yr. ago

AFAIK, for all your products in all the languages (this could go crazy in numbers pretty quickly : 100 products × 25 langs will have 2500 diff urls) you will have to pregenerate paths (because No JS for search engines (i know GSE has JS running capabilities but no guarantee )) and SSR will create static index.html inside those paths. Search engines will access the non-JS version to index and real user will see the hydrated version. Just some pointers as i might not be technically very accurate because i did it a while ago.

1

User avatar

level 2

dmitryef

·1 yr. ago

In-depth article on handling localization with server-side rendered apps:
https://medium.com/angular-in-depth/lost-in-translation-strings-846566376951

1

User avatar

level 3

sanjayatpilcrow

·1 yr. ago

There was not much problem with publishing different localized pre-rendered versions (though it had its own quirks which i dont remember right off the bet). IIRC i had to write script for deployment (my infra had - Amazon S3 bucket, Cloudfront, Lambda function). By the way, for the sake of simplicity and familiarity , i used transloco instead of built-in angular translation. My goal was to have Google et. al. index all the localized versions of my site at once and ASAP (not after sometime as is usually the case with SPAs), but I was only partially successful in achieving the goal.

1

level 1

Comment deleted by user·1 yr. ago

User avatar

level 1

kana_7

·1 yr. ago

If you need to implement seo in a simple angular app with your own hosting solution, the documentation handles this case pretty well. But if you're using firebase, i18n, angularfire2 with firestore that's where the fun begins. Implementing angular universal in our app was the worst dev experience I ever had in my career so far. Once you figure out how to serve your i18n builds in your cloud function, you think you're done with your solution. But guess what? Pretty much any request to firestore can freeze your server, resulting to an internal server error and no clue in your cf logs. I had to test every request called on page load to see which one was responsible. At last, it worked. Then 6 months later, new versions: angular 12 and new angularfire api. I gave up. It seems like it is impossible to make the two to work together. Now, I am on angular 12 with the older version of angularfire2, hoping that Google will solve this mess one day.

3

User avatar

level 2

DanteIsBack

OP·1 yr. ago

Does firestore use promises? Could it have something to do with the event loop getting clogged up?

1

User avatar

level 3

kana_7

·1 yr. ago·edited 1 yr. ago

It uses observables to get updates in real time (you can also use promises of course).

This is clearly related. But there 's no unresolved request in my case. NgZone stays on a unstable state which hang the server response. But it is not always the case depending of the situation which is pretty hard to debug. Without ssr (csr), the app works fine.

With the new firebase Api though, issues are straightforward. All observable based calls lead to a server error. Promise based calls work. But I cannot switch all my app to promises calls.

2

User avatar

level 4

jiggity_john

·1 yr. ago

I used to get this problem before as well. I think it is because the Firestore sdk uses longpolling to listen for changes when you are listening for changes, so the framework has a hard time realizing that you are actually finished rendering (it appears to angular as if there are still outstanding promises). I think the maintainer of angularfire put in some hacks to get this to work properly and the problem just kind of went away for me luckily.

2

User avatar

level 5

kana_7

·1 yr. ago

If you could share a link to those hacks, that would be very nice of you.

1

User avatar

level 1

Burgov

·1 yr. ago

They don't use Universal at Google internally much, which is why it's not quite up to the same standards as the rest of the framework. It gets less priority from the team.

Having that said, once you manage to set it up, it works well. It can be very tricky to do so for projects with a lot of dependencies tho, because you just have to hope they can all run in a NodeJS environment

4

User avatar

level 1

luisbedoya13

·1 yr. ago

You can give a try to Scully, behind scene works different (with puppeteer launching a chrome headless' instance), but I've read that works nice

2

User avatar

level 1

jiggity_john

·1 yr. ago

You can't compare Universal to Next and Nuxt because they aren't the same thing. Universal isn't much more than a solution for rendering existing Angular apps in a nodejs environment with a couple of helper classes for rehydrating the app in the browser environment. It isn't a new framework and there exist similar libraries for rendering existing React apps serverside.

Next and Nuxt on the otherhand are full frameworks for building isomorphic javascript apps and have been built from the ground up with that goal in mind. Their holistic approach to building these kind of apps is why they do it so much better than Universal.

It also helps that Next is well funded and has a dedicated development team _outside_ of the React team. Universal is maintained by the Angular team and they quite frankly have enough on their plate maintaining just he core framework, not to mention all the extra bells and whistles. There is a reason why libs like @angular/pwa and @angular/elements don't get a lot of love.

Now, it is 100% possible to build a Next / Nuxt-like framework for Angular by leveraging the core framework and rendering pipeline like how React and Vue are being used in Next and Nuxt. It would just take a lot of work.

2

 

level 1

vicmarcal

·1 yr. ago

Angular Universal is a “hack”, I have been following it through the years and it is, sadly, a no go in its current status. If you need SEO dont use Angular, use a SSR solution. And with SEO I mean not just Page Ranking but (the most important bit) sharing links: whatsapp, nor Twitter, nor Facebook will show what you expect (since they dont wait the page to be loaded). Angular Universal needs you to Pre-render static pages. But the pages are not static, so what happens with pages of the kind product/:id or product/:slug? Do I have to prerender a page in real time each time an user creates a new product? Or Post?etc? What if I have 3 Millions of products? Do I have to prerender 3M of pages? No go. Aside of other issues Angular Universal have, for me this is the most important bit.

However I believe Angular is trying to do something. The first step they are doing is to remove Modules, and let the Components to be standalone. So next year we will see standalone Components, creating an alternative to React components. This way, with standalone Components importing other components, services, etc, we would be able to use them as pieces inside a PHP, Node or any other SSR solution. Being PHP and Node the ones managing all Routing ( and we losing Router, etc) and the Angular Components being just part of the SSR page. Removing Modules will free the Routing, and freeing the Routing but letting the Components to talk via Services, Input/Output, Directives, Pipes...will be still possible. So moving into some Reactish/Vueish approach.

So I still have hopes regarding Angular Universal as a NodeJS framework loading standalone Components, and maybe they can do some magic in hydrating a SPA if your NodeJS paths matches the Angular SPA ones or something.

2

User avatar

level 1

uplink42

·1 yr. ago

I use Scully.io. it's just easier to work with and does more or less the same thing as universal.

2

 

level 1

barristan_sell_me

·8 mo. ago

Here's a quick and easy, start to finish, run through of setting up Angular Universal with Firebase Hosting & Functions that should help any of you looking for a good tutorial(not made by me):

https://www.youtube.com/watch?v=k7pLxaKkHYs

2

 

level 1

lars_jeppesen

·18 days ago

Analogjs.org

1

文章链接

标签