Coder Social home page Coder Social logo

aerojs / aero Goto Github PK

View Code? Open in Web Editor NEW
183.0 183.0 20.0 1.2 MB

:bullettrain_side: Fastest node.js framework. Go version is actively maintained: @aerogo

License: MIT License

JavaScript 99.13% CSS 0.39% HTML 0.47%
framework high-performance javascript pug stylus web web-server

aero's People

Contributors

akyoto avatar hammster avatar patrickmichalina avatar usameavci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aero's Issues

Global scripts

Global scripts used on every page should be in the scripts directory. Compilation order is determined by the configuration file.

Page JSON

If there is a JSON file it should be automatically loaded and added to the locals of the jade template render.

Global styles

Styles that can be used on every page should be in the styles directory.
Compilation order is determined by the configuration file.

Layout JSON

Load JSON file for the layout and send the data to Jade.

JSON linting

Should automatically check the JSON output from pages that send back JSON.

Middleware

We need a middleware architecture.
Middleware that works with frameworks like Express should work with Aero as well.

Documentation

  • Configuration
  • Layout
  • API
  • Browser scripts (for pages)
  • Pages
  • Scripts
  • Styles
  • Controllers

Page styles should be global styles, not scoped

Scoped styles are an anti-pattern for rendering performance.
It's better to properly use CSS classes instead of relying on the scoped attribute because recalculating styles on an AJAX request is bad for performance.

Therefore page styles are going to be global soon.
You should still put them into the page directory because you'll want all related components in one place.

Default "reset" style

Add a default style called "reset" which will be used if reset.styl has not been found in the styles directory of the project. It should include a pretty standard HTML 5 reset.

Use promises instead of async

Use a very high-level definition of what Aero is doing in aero.run() using Promises and emit the event "ready" when everything finished.

Not all tests are run

Sometimes only 14 tests are run and it incorrectly reports that the build is passing.
This needs to be fixed asap.

Custom routing

The server and aero.get() should support custom routes.
That means that you can associate /very/special/route with a request handler.

Load plugins as node modules

Currently they're included in Aero but they should really be external npm modules.

Something like:

require(`aero-${pluginName}`).init()

response.json()

Should automatically set headers.
Only available on pages without templates.

Serve static files

Each folder specified in the "static" array in the configuration should serve static files.

Optional:

  • cached with gzip compression
  • automagically watched by Aero

Compression

gzip compression should be enabled by default.

Subpages

Aero should scan subdirectories for controllers and add them to the router.

passport.js

Test if passport works normally with Aero.

Controllers without boilerplate

Example:

  • page.get.js
  • page.post.js

These files wouln't need to include the controller object & function boilerplate:

module.exports = {
    get: function(request, response) {
        response.end('Hello World')
    }
}

So the content of page.get.js would simply be the bare minimum:

response.end('Hello World')

The only problem is how request and response should be named since this is very opinionated.
Personally I prefer to not use abbreviations because we have autocomplete for a reason. So I'd go with the names I just mentioned.

Implementation

page.get.js should simply be compiled into a module that exports the get function. The get function is then assigned to the either existing or automatically created controller object.

Stylus

Stylus compilation to CSS.

Better HJSON file extension

Seriously, 5 characters is too much.

Maybe HSON or HON. I like HSON because it makes it very obvious that it's JSON related, however the letters don't make much sense (Human Scripting Object Notation?). Well screw the meaning, it looks better.

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.