This is a cache of http://dbflute.seasar.org/lastaflute/index.html. It is a snapshot of the page at 2024-11-01T00:55:22.555+0000.
LastaFlute | DBFlute

LastaFlute

What is LastaFlute?

Typesafe Web Framework for LeAn STArtup with DBFlute and Java8

Rhythm & Speed Programming

Startup has repeated trial & error so light-weight development environment is needed.

Hot Deploy
fix action and immediately confirm it without reboot
Lightening Boot
fast reboot even if it needs to reboot

 

.........................................................rhythmical thinking is speed

Adaptable-to-Change Programming

Startup has repeated requirement change so safety mechanism is needed.

Hard Typesafe
typesafe action implementation and condition-bean
Aggressive DB Change
DBFlute on Full Power, and FreeGen
Crazy Logging
looks-like-good log

 

.........................................................safety is speed

Naturally-be-so Programming

Startup has also repeated human resource change so power of natural is needed.

Convention Mapping
URL = class + method: searchable class from URL
Less Choice
remove unneeded option, uniform as possible
Default Libraries
from configuration to mail library

 

.........................................................unshaken is speed

LastaFlute Cast

LastaFlute Cast

LastaFlute Repository (with License, Fork info)

The source codes are in Github. You can also see the license and fork information.

How to implement

Java8-on-parade Action.

Mapping Convention

Request URL
Action class + Execute method

Package Convention

Application Package
[your domain].app e.g. org.docksidestage.app
Web Package
[Application Root].web e.g. org.docksidestage.app.web
Action's Package
*you can use Action's prefix package

Example for HTML response style

e.g. Action for URL '/product/list/3' as HTML response @Java
@Execute
public HtmlResponse index(OptionalThing<Integer> pageNumber
                        , ProductSearchForm form) {
    validate(form, messages -> (), () -> {
        return asHtml(path_Product_ProductListJsp);
    });
    PagingResultBean<Product> page = productBhv.selectPage(cb -> {
        cb.setupSelect_ProductStatus();
        cb.query().setProductName_LikeSearch(form.productName, op -> op.likeContain());
        cb.query().addOrderBy_ProductName_Asc();
        cb.paging(getPagingPageSize(), pageNumber.orElse(1));
    });
    List<ProductRowBean> beans = page.mappingList(product -> {
        return mappingToBean(product);
    });
    return asHtml(path_Product_ProductListJsp).renderWith(data -> {
        data.register("beans", beans);
        registerPagingNavi(data, page, form);
    });
}

Example for JSON response style

e.g. Action for URL '/product/list/3' as JSON response @Java
@Execute
public JsonResponse<SearchPagingBean<ProductRowBean>> index(
                OptionalThing<Integer> pageNumber
              , ProductSearchBody body) {
    validate(body, messages -> {});
    ListResultBean<Product> page = productBhv.selectPage(cb -> {
        cb.setupSelect_ProductStatus();
        cb.query().setProductName_LikeSearch(form.productName, op -> op.likeContain());
        cb.query().addOrderBy_ProductName_Asc();
        cb.paging(getPagingPageSize(), pageNumber.orElse(1));
    });
    SearchPagingBean<ProductRowBean> bean = createPagingBean(page);
    return asJson(bean);
}