GithubHelp home page GithubHelp logo

Structuring of Code about palomar HOT 1 OPEN

jmohler1970 avatar jmohler1970 commented on August 17, 2024
Structuring of Code

from palomar.

Comments (1)

jmohler1970 avatar jmohler1970 commented on August 17, 2024

I have 3 sources of inspiration on how to organize code. FW/1, Ruby on Rails, and Bootstrap.

image

FW/1

FW/1 is a MVC (model, view, controller) framework.

Models are further subdivided into beans (transients) and services (singletons).

HTML generation is divided into views, which happen early in request process and layouts which happen late in the request process

FW/1 Controllers are straight forward. Unlike ColdBox all variables are in the rc scope.

Ruby on Rails

Ruby on Rails provides a different set of inspiration. When a Ruby on Rails website is setup, all kinds of directories are created along with it. I have taken the most interesting and added them to the FW/1 mix. These directories are

controllers/concerns for re-used functions in various controllers
model/beans/concerns/ for re-used functions in various beans
model/services/concerns/ for re-used functions in various service

This application is so small, it does not have anything that would fall into those categories, but I like that there is a place for them.

vendor is used for all CSS, Fonts, and JS from 3rd parties.

These are considered to be static. For there is a CSS or JS file that will be altered, then it belongs in assets.

Bootstrap

Bootstrap is not free form its structure. The path for its fonts must be ../fonts/ For this reason vendor/fonts must exist.

from palomar.

Related Issues (17)

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.