Giter Site home page Giter Site logo

ember-engines / ember-engines.com Goto Github PK

View Code? Open in Web Editor NEW
21.0 8.0 28.0 6.28 MB

Step-by-step guides for using the ember-engines to create composable apps

Home Page: http://ember-engines.com/

License: MIT License

JavaScript 54.46% HTML 10.56% CSS 3.19% Handlebars 31.79%
ember-engines documentation microfrontends ember

ember-engines.com's Introduction

ember-engines npm version Build Status

This Ember addon implements the functionality described in the Ember Engines RFC. Engines allow multiple logical applications to be composed together into a single application from the user's perspective.

Packages

This project is a monorepo managed by pnpm workspaces. All packages are organized in the /packages/ directory.

The only public package is ember-engines. Other packages are private to this repo and are used to support testing ember-engines.

Documentation

Check the full documentation in the Ember Engines Guides.

Support

Having trouble? Join #ember-engines on the Ember Community Discord server

Contributing

See the Contributing guide for details.

License

Copyright 2015-2022 Dan Gebhardt, Michael Villander and Robert Jackson. MIT License (see LICENSE.md for details).

ember-engines.com's People

Contributors

acorncom avatar akankshadharkar avatar bartocc avatar bertdeblock avatar cdransf avatar chriskrycho avatar ctjhoa avatar daniel-de-wit avatar dependabot[bot] avatar dgeb avatar eflanagan0 avatar gabrielcsapo avatar gavinjoyce avatar gcheung55 avatar jherdman avatar locks avatar lordblendi avatar machty avatar meori avatar mikoscz avatar perlun avatar pfmmfp avatar rajzshkr avatar rwjblue avatar samselikoff avatar sdahlbac avatar sergeastapov avatar sivakumar-kailasam avatar trentmwillis avatar villander avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-engines.com's Issues

Accidentally fingerprinting of documentation text

On this page:

https://ember-engines.com/docs/lazy-loading

The text reads:

Lazy engines are built in the same way as eager engines, but their assets are not combined back into the host application's vendor-b8fae49b3b61342eec0bbbd72949609f.js file. This means that they are run through a separate and unique build process from what a default addon will go through, though it reaches out to the upstream implementation in Ember CLI where possible.

Most likely, broccoli-asset-rev saw the string vendor.js and tried to helpfully replace it with a fingerprinted version for you.

There's not much to be done upstream in broccoli-asset-rev, it uses a fundamentally unsound strategy. You can probably play tricks, like I think you can set outputPaths.vendor.js on your EmberApp to a name other than vendor.js so your own vendor file will have a different name that doesn't match the docs.

Questions/remarks regarding the migration/deprecation guide

I feel it's not really clear what's actually being deprecated. If you analyse the before and after examples you kind of get the gist of it, but I feel the copy itself could be clearer. Maybe something like:

Defining a dependency on the host's router service as router has been deprecated. Please specify an alternative name. E.g. { 'host-router': 'router' }.

The guide also mentions: we don't want to automatically create either of these services.
Which other service is the guide talking about?

The after example also contains a syntax error: { 'host-router'}: 'router', and I think we should also update the engine name from superBlog to 'super-blog' as camelized engine names are also deprecated (which we should probably also add to the guides?).

Improve documentation on engine-addon development workflow

I have started out with in-repo engines, which were really easy to setup and get started.
Now, I wanted to use the lazy loading feature, so I migrated them to dedicated addons. However, it turned out that wasn't as straight-forward as I imagined it to be. So I figured the things I "missed" there could also be missed by others, so they might as well go into the README. I'll make a PR with the information I gathered, but wanted to verify a few things so that the information I write there is correct ;)

All dependencies of the host app need to go into the engine's devDependencies
All dependencies of the engine need to go into the engine's dependencies
a.) Everything in the dependencies will be included in the lazy loaded bundle
b.) Nested dependencies do not work correctly. For example, if an engine has a dependency A, which itself has the dependency "ember-d3" (which loads D3.js), then D3.js will not be correctly loaded in the engine. Instead, you need to also include ember-d3 as dependency of your engine.
c.) Remove the ember-disable-prototype-extensions addon from the engine
"ember-engines" should additionally to devDependencies, also go into "peerDependencies"
The engine's dummy app should be setup like the host app

(Moved from ember-engines/ember-engines#307)

https certificate is not secure

Visit via https shows a certificate error

This server could not prove that it is ember-engines.com; its security certificate is from *.herokuapp.com. This may be caused by a misconfiguration or an attacker intercepting your connection.

Re-exporting an in-repo addon?

In Sharing Components and More:

The EngineAddon base class hooks into Ember-CLI's build hooks to automatically re-export addon code into your Engine.

I understand that it works with standalone addons. But what about in-repo addons? What should I do in my package.json if I want EngineAddon to re-export it?

Also, if my component comes with a template, is it going to work? Can templates be imported and exported?

Thanks!

Creating an Engine page includes fingerprinted reference to engine.js

On http://ember-engines.com/guide/creating-an-engine, I'm seeing

Finally, to make this addon an actual Engine, create a engine-9a8730385358089493240e80cecd95bf.js file under the addon directory:

I'm assuming from looking at the markdown file that this should just be a reference to engine.js, not engine-9a8730385358089493240e80cecd95bf.js. Strangely, some of the other references to engine.js in this file don't have the same problem.

Duplicated example in guide at "Linking Within An Engine"

In Linking Within An Engine the following example is duplicated:

Previously we mentioned that each Engine has it's own application route, that route corresponds to the mount point when within the Engine. So, if you wanted to go to super-blog (or the root of the Engine) from within the Engine itself, you would do something like:

{{#link-to "application"}}Blog Home{{/link-to}}

Or, maybe even:

{{#link-to "application"}}Blog Home{{/link-to}}

Clarify the philosophy and intended uses for engines

Ember Engines just want to separate a big app into many apps manually to isolation concerns
& responsibilities, one type of microservices on front-end with emberJS.

the docs need to make sure to de-emphasize code-splitting / lazy-loading a bit
I think engines have been overused for this because they have been the only way to achieve it
and this will change with embroider

Exporting engine addon services to application?

I have an in-repo-engine that can provide its own service to the root application. However I'm unable to use any services provided by addons within my engine. TLDR:

Engine Service -> Application -> OK
Addon Service -> Application -> OK
Addon Service -> Engine -> OK
Addon Service -> Engine -> Application -> NOT OK

In this specific case I was working on an authentication engine that handled user login/password reset etc, and provided a 'session' service that determined if the user was authenticated or not. The session service is provided by the ember-simple-auth addon. I've tried providing the dependency for ember-simple-auth to both the application and engine, but what I end up with appears to be a duplicate service, not a singleton.

What I'm seeing is that there is no way to provide a shared service from an addon within an engine with the root application. This is unfortunate because it means I can't constrain the domain concerns of 'user authentication' within my auth engine. Is this something that is possible with the current ember engines? Is this a desirable behavior engine will ever support?

Quest: Ember Engines Guides MVP Tracking issue

Hello and thanks so much for helping out with the Ember Engines Guides! We need the knowledge you've gained over the years using ember-engines

High level tracking, in progress:

This section is purely for tracking how much work we still have left to do, in a very broad sense.

General

  • Almost all docs from README should be moved to ember-engines.com. Having similar but different info in both places is confusing and unmaintainable. [ issue ember-engines/ember-engines/issues/540 ]

  • Clarify the philosophy and intended uses for engines. [ issue #57 ]

    Is the "Why Use Engines?" section on http://ember-engines.com/ sufficient?

  • Update the "Engines Roadmap" section [ issue #56 ]

    Link to the 1.0 Roadmap

  • Include a section on using engines with Fastboot. [ issue #58 ]

  • Testing section is completely blank. We need to discuss what's possible today. [ issue #59 ]

  • Make Ember Engines more public for beginners in Ember.js [ issue ember-learn/guides-source/issues/701 ]

  • Upgrade documentation with Ember CLI Addon Docs, improving UX [ issue #50 ]

Building Engines

  • Clarify that engines should always be built together with their host app and other engines, regardless of whether they are lazy or eager. This is required for hosts to understand and properly bundle engine dependencies and routes. [ issue #56 ]

  • Explain what will happen when there are dependency mismatches between different engines and/or their host app. [ issue #60 ]

  • Explain the dependency deduping that is currently performed. [ issue #16 ]

  • Explain the manual verification of dependencies that is needed right now. [ issue #61 ]

  • Include a few examples that lists a host app and engines, as well a few dependencies (common and shared) to illustrate points. [ issue #62 ]

Lazy engine doesn't handle query params properly

I stumbled upon that the lazy engine cannot handle the query params very well.

For example, a host app mounted an engine as blog, so /blog will load this engine lazily. Then:

  1. If we input /blog?foo=123 directly, BlogController.foo will be null, but it should be 123.
  2. If we transition to /blog?foo=123 from the host app, then BlogController.foo will be 123.

Not sure if this is a bug or intentional.

standard highlighting for shell examples confuses me

This is markdown nitpicking but would be a nice to have if someone wants to contribute.
screen shot 2019-01-17 at 14 07 59
If you take a look at some of the embedded markdown, the shell examples are not specified as bash and so the keyword highlighting looks distracting to me.
Check out the create an engine page .

solutions

i. disable highlighting for these ones?
ii. ensure all examples are labeled and this repos styles match?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.