Yserz / fhb-tutorien

Website for free programming tutorials and screencasts.

Home Page:http://www.welovecoding.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

We Love Coding — Web App

This is an attempt to make www.welovecoding.com a better place...

Build Status

Configuration:

MySQL

  • Database: welovecoding
  • User: welovecoding
  • Password: 123456
  • Host: localhost

LESS preprocessor

Istallation

  1. Install NodeJS
  2. On command line: npm install -g less
  3. Add lessc.cmd (for Windows) to the LESS path in NetBeans: C:\Users\username\AppData\Roaming\npm\lessc.cmd

Project configuration:

  • Input: /WEB-INF/frontend/less
  • Output: ../resources/META-INF/resources/css/generated

Disable debug info

CoffeeScript

CoffeeScript in NetBeans

Naming conventions

Classes

Everyhting that is getting raw data from our database or a third party API and maps that data into entities of our own structure is called a Repository.

A Service uses entities (given by a Repository) and provides them in a sorted, filtered or unfiltered way so that they can be used by a Controller. A Controller is then used to provide the requested data for a view (JSF page).

Packages

Every self-contained big feature (called an "epic") has it's own package, like com.welovecoding.blog. A package of an "epic" consists of the main packages: data, view and api (api is optional). The view package is used to keep classes that are used for view-related operations (like our Controllers). In the data package you can find all classes that are needed to retrieve and map data (like our Repositories & Services). The classes themselves belong to context specific packages inside the main packages.

Here is an example for a possible "blog post" which a part of the context of a "blog" module:

com.welovecoding.blog.data.post.PostEntity
com.welovecoding.blog.data.post.PostRepository
com.welovecoding.blog.data.post.PostService
com.welovecoding.blog.view.post.PostController
com.welovecoding.blog.api.post.PostResource

In our example a blog post entity can have embedded entities. If that is the case and if there are multiple entities, then we will add an extra package inside the data.post package.

Example

com.welovecoding.blog.data.post.entity.PostEntity
com.welovecoding.blog.data.post.entity.LanguageEntity
com.welovecoding.blog.data.post.entity.TagEntity

Useful resources:

Java

Mobile Web Apps

Rules & Conventions

UI & UX

Reference:

##Cool projects:##

Web Tools

##Website Analyzer:##

Tools:

##REST service##

##Lessons learned##

  • Avoid using component bindings to a bean that has session scope
  • Never assign FacesContext as instance variable of a view/session/application scoped managed bean, because the FacesContext instance is request scoped
  • h:commandButton is not working

Always strive to make code that can be modified with the least number of edits. - Lea Verou Optimize only as needed. - Adam Bien

Authors

Benny Neugebauer on Stack Exchange

Michael Koppen on Stack Exchange

About

Website for free programming tutorials and screencasts.

http://www.welovecoding.com/


Languages

Language:CSS 52.5%Language:Java 27.3%Language:JavaScript 20.2%