Git Product home page Git Product logo

nodgine's People

Contributors

sateffen avatar

Watchers

 avatar  avatar  avatar

nodgine's Issues

Introduce a $UTIL object

Maybe there should be an $UTIL object within the nodgine, helping with some alltime known polyfills. Maybe even have methods to extend the original prototypes with some new methods.
A good example of such useful functions is underscorejs

Logger should have a minimum loglevel

There should be a configurable minimum log-level for the logger, so the user could say "log just warnings and errors" in production to have a cleaner logfile.

Switch from YUIDoc to JSDoc

A lot of IDEs have support for JSDoc, so it would be nice, if this could be used. So if the documentation on the wiki is good enough, I should think about switching from YUIDoc to JSDoc to use this helpful support.

Write test spec

The current test system is pretty simple, but they are hard to read.
The testsystem gets changed to a BDD style test system, with a new written spec.
Additionally, it's generating a coverage report.

The old tests will be still there, till the new spec is done.

List, what needs to be done:

  • application
  • bootstrap
  • logger
  • router
  • service

Overhaul documentation

The documentation should be overhauled, because it's telling pretty much nothing.

The main concept of this library is based around promises, that should get pointed out. That way it's simpler to compare to other solutions like koa or express.

Rewrite the Readme

The readme is currently pretty messy and not nice. People seeing it will go like "wtf? No". For the next version, the readme should be rewritten.

Websocket Support

Usually a real cool application doesn't only use HTTP, it's using Websockets as well. Maybe there is a possibility to ingetrage websockets into the nodgine, so the webserver and websockets can listen at the same port, so there is no need for CORS cause of different ports.
I guess there has to be some research done, whether it's possible with some other frameworks or whether there is a need for native support.

New loglevel: debug

For development there should be a new log-level called debug. This is under log and is for development only.

Remove load-path stuff

The load-path stuff was a bad idea, that has no future. A real node application will handle this by far better.

Remove it.

Load services before routes and processors from json

Currently the services are registered after the routes and processors, when configuring the project by json.
This should be the other way around to prevent errors, when a routecontroller wants to query for an service.

Optimize controller routing

Imagine, a service has a lot of routes, 50, maybe 100, and the most requested ones are the last ones. That would be a lot of overhead, every request again.
Maybe there should be a way to count each request, and sort the list of routes and controllers, so the most requested is at the top, the least requested at the bottom. Then some load in peaks could be minimized. Not a lot, but it could save some CPU by allocating only a very little more memory.

Rework all exceptions

The exceptions aren't useful for debugging, but they should. So every exception should be reworked to a meaningful expression

Enhance documentation

The documentation is automatically generated, but is not pretty good. Maybe some handwritten documentation would help. Some examples would be fine, too.

Add * to arguments for route-controller

In the arguments, passed thru to the controllers, the * should be contained. The star is maybe covering important information, that should be parsed afterwards.

HTTP Interface in JSON

There should be an option to configure an interface in the JSON. Currently it's only possible to set a port.

Configurable via json

Maybe there should be an possibility configure the whole process via a json file. Currently the main javascript file is simply a file, that calls hundred times addRoute, hundred times registerService, finally startHTTP and then run. This gets pretty unreadable. A json file would be better.

Limit request body

Currently, the complete request body is written to a buffer. That allows an attacker to set a request body with more than 1gb, which exhausts the complete memory, and crashes the server.

There should be a configurable limit, which protects the process from to huge request bodys.

A limit should be set to 4mb, 8mb or 10mb.

Rework the functionality of IDs for services

Currently a service gets it's own unique id by the system. This doesn't look like the first idea of the services interface. The first idea was to have a simple interface like handling DOM-elements: By type (class) and id. There should be a possibility to set an own id at the registration of a service, so this id could be used in the whole application, instead of using the type to identify a single service.

Move extensions to another repo

The extensions like for the preprocessors, postprocessors, or even static-file route-controllers should be moved to another repository and module.

After this they can be loaded separately and you can develop them independently, without releasing nodgine versions where nothing changes.

Add access to the post-data buffer

Currently the post-data can be accessed by request.post . This is a string, but a string is not useful in every situation. There should be the possibility to access the original buffer as well.
With the buffer-access the performance of some actions will increase as well.

Make all methods writeable

All methods of the main objects, should be writeable. It's not the "javascript-style" to refuse rewriting them.

Rename the components of the nodgine

The components should not be written in uppercase, linke $LOGGER, oder $APPLICATION. This should get corrected to $Logger, $Application, $Router and so on.

Restructure project

The project should be restructured to something more convenient like
/src
/dist
/test
and remove the docs, because it's in the wiki

Add a default route-controller for static files

It's a common use case, to serve a folder as static file directory. So if the user calls myurl.com/app/test.js the file test.js belonging to configured directory should be served.
Currently you have to write this by yourself, every time again, this is not cool. There should be a default route-controller that could be used for this, if wanted.

Logging more data-types

The user should be able to log more than just strings. There should be an option to log objects and so on as well.

Make response.writeContinue work

With the current nodgine the response.writeContiunue is not possible. This should be possible to use, cause some applications may rely on this.

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.