Giter VIP home page Giter VIP logo

aah's People

Contributors

adelowo avatar elevenbag avatar equanox avatar jeevatkm avatar joelsdc 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aah's Issues

Ability to list current existing aah applications from $GOPATH

Hi,

I'm trying the aah framework, and I'm missing the ability to list my existing applications.

I have created 3 apps:
test - api
test2, test3 - web

It would be nice to have something like: aah list // aah show (or whatever)

├── test
│   ├── aah.project
│   ├── app
│   ├── config
│   └── i18n
├── test2
│   ├── aah.project
│   ├── app
│   ├── config
│   ├── i18n
│   ├── static
│   └── views
└── test3
    ├── aah.project
    ├── app
    ├── config
    ├── i18n
    ├── static
    └── views

Thanks!
Joel.

Streamline template library for extensible

Simple and Effective Interface is already implemented.

However, currently template/view lacks easy way of adding custom developed template engine in to aah framework and app config.

Package Versioning

Implement Package versioning for all aah framework library/modules and use versioned packages.

  • aahframework.org/aah.v0
  • aahframework.org/log.v0
  • aahframework.org/config.v0
  • aahframework.org/essestials.v0
  • aahframework.org/test.v0
  • aahframework.org/pool.v0
  • aahframework.org/forge.v0

Controllers Namespace or Sub Package support

Note: currently framework supports multiple sub packages with in controllers package. However it has limitations.

  • You cannot register controller with package into routes.conf
  • Controller Name must be unique even though it reside in sub packages

Migrate session library into security

Technically session is part of application security, it makes to move session into security
package.

Also it creates the path for upcoming feature implementation like CORS, CSRF, Security Headers, etc.

create multiple controllers?

Hi, Does it support creating multiple controllers?

frontend
└ controllers
└ models
backend
└ controllers
└ models

Extract submodule as separate libraries

  • ahttp - aahframework.org/ahttp
  • aruntime - aahframework.org/aruntime
  • atemplate - aahframework.org/atemplate
  • i18n - aahframework.org/i18n
  • router - aahframework.org/router

Application Security

aah brings the simple, effective security implementation, inspired by apache shiro security library.

Goal is to provide elegant way to fulfill application security.

  • Authentication
    • Schemes
    • Principals
  • Authorization
    • Roles
    • Permissions
  • Subject
  • View Template Functions
  • Routes Configuration
  • Security Configuration
  • Integrate into aah
  • Documentation

Template Path Auto Resolve

Template path confusion?

How do I implement a custom template file path?

views\pages\backend\app\index.html
views\pages\frontend\app\index.html

Problem
app/controllers ->
Package: frontend
Controller: App
Action: Login

Incorrect: It resolves to template views/pages/app/login.html

Correct: It suppose to be views/pages/frontend/app/login.html


When I call ctx.Reply().HTMLf("index.html", data)

Incorrect: It resolves to template views/pages/app/index.html

Correct: It suppose to be views/pages/frontend/app/index.html

TestSuite for integration and functional test case.

Goal is to provide capabilities so aah framework users can do effective test cases (unit, functional, integration) for their application.

Note: my goal is not to develop testing framework instead provide test capabilities, so that you can use your choice of test tools. For example: goconvey(as mentioned by @julienkosinski below), ginkgo, testify, etc.

What do you mean by test capabilities?

Test capabilities means - providing ability to create an test instance easily and effectively. Such as Context, Request, Response, Response Recorder, aah Test Server, Basic assertions, etc. So that you can develop/create your test cases with creativity, imagination and of-course acceptance.

Why aah has aahframwork.org/test.v0 library?

Well for writing unit cases within aah framework across all the modules, I have abstracted wth required assertion as library and using it across. Of-course you can use it too :)

Can I go with only aah framework test capabilities?
Yes, you can. I believe it would satisfy your application testing needs in addition to standard testing package. Ultimately it's your choice of testing requirements.

I hope it clarifies the aah goal.

Minify HTML, inline CSS and inline JS

Goal is to achieve HTML minify with inline JS, CSS (i.e. JS & CSS define on the page) and configuration option to customize it.

  • Make it extensible, so that it provides an option for further extension.
  • Library: github.com/tdewolff/minify

Note: This is not a static files minify for JS and CSS.

Hot-Reload for Development

Goal is to provide hot-reload capabilities for development, so that it helps developer to have fun development.

What is Hot-Reload?

To reflect changes made in Static Files (js, css), View template file and Go Source Code without manual intervention (i.e. manually stopping server and starting the aah server). Instead aah CLI will do monitoring/watch on aah project and does automatic stop, compile and start the aah server.

Design and Implementation

Approach and solution will be done in aah cli tool. It is not applicable for prod environment profile. It highly recommended to build and deploy the archive for production use.

Static Files

aah framework delivers static file using standard library func http.ServeContent, which is by default adds the Last-Modified response header and by default modern web browser does cache the static files locally.

Solution is to prevent cache and deliver file always- (only for dev environment profile)

  • Set these HTTP headers
    • Cache-Control: no-cache, no-store, max-age=0, must-revalidate
    • Expires: 0

Go Source directory, view directory, config directory

Typically every go program gets compiled before the execution. The view template files compiled and stored in memory on server start.

Solution is to reflect code changes - (only for dev environment profile)

  • Monitor files and directories
  • If change event occur then stop the server, recompile and then start the server
  • There are limitation to this, will document it later on.
    * Standard Library Path is not applicable i.e. GOROOT

Will try to bring this feature as early as possible.

  • Static Files
  • View Template Files
  • Go Source Code
  • Config Files

Make object Pool size value configurable from aah.conf

# Tune this value based on your use case. Pool doesn't create object unless needed.
# Below numbers are produces good results.
# TODO results reference
pooling {
  # used for `aah.Context` and `ahttp.Request`
  context = 150

  # used for `bytes.Buffer`
  buffer = 60

  # used for template `import` func
  import = 50
}

Provide binder from aah logger to Go Logger

Provide binder from aah logger to Go Logger. So that third party libraries logging can be binded with aah logger seamlessly.

For e.g: direct to http sever error logging into aah logger

&http.Server {
    ErrorLog:   log.ToGoLogger(),
    // ...
}

Possibility of directory traversal vulnerability on Static File delivery

On Reddit user epiris reported the possibility of directory traversal vulnerability on Static File delivery.

I have analyzed the issue and pointers from epiris. aah framework uses http.Dir internally for serving directory listing. http.Dir has checks for Dot-Dot, \ path separator and \x00 char to prevent directory traversal vulnerability.

However it is good to place the check at framework before processing an incoming directory listing request.

Thanks to epiris for taking out his time.

Note: Static file/directory delivery scenario's protected by http.Dir.

Note: As per framework design, this issue possibility is only applicable to directory listing, not for static file serve. Since static file config is defined by application user in the routes.conf. aah framework will not entertaint any request if the definition doesn't match from routes.conf.

wildcard subdomain support

I've set up a rudimentary alternative using Server Extension but might be better in the router itself.

Auto Parse/Binding for Request Params and Body

Goal is achieve auto bind of request values into controller action parameters based on content type.

In addition to that, create an extensible RequestParser capability by Content-Type. So that user can write their own request parser by content-type.

  • Request parser implementation
  • Auto Parse and binding by content-type and datatype
  • Documentation

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.