All Projects → Pyknic → Codegen

Pyknic / Codegen

Licence: other
A model-view based code generator written in Java

Programming Languages

java
68154 projects - #9 most used programming language
language
365 projects

Projects that are alternatives of or similar to Codegen

MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (-13.89%)
Mutual labels:  mvc, view, model
Diamond
Diamond is a full-stack web-framework written in The D Programming Language using vibe.d
Stars: ✭ 173 (+380.56%)
Mutual labels:  model, mvc, view
modelina
Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Stars: ✭ 55 (+52.78%)
Mutual labels:  model, generation, codegen
Modelassistant
Elegant library to manage the interactions between view and model in Swift
Stars: ✭ 26 (-27.78%)
Mutual labels:  model, mvc, view
DTE
Generate C# class from database table
Stars: ✭ 26 (-27.78%)
Mutual labels:  model, generate
laravel-bootstrap-components
Ready-to-use and customizable form components.
Stars: ✭ 20 (-44.44%)
Mutual labels:  generate, generation
nuts
Nuts and bolts for building cross-platform UI (HTML, Flutter, CLI) using Dart. Also screw frameworks (React, Vue, Angular).
Stars: ✭ 12 (-66.67%)
Mutual labels:  mvc, view
python-makefun
Dynamically create python functions with a proper signature.
Stars: ✭ 62 (+72.22%)
Mutual labels:  generate, generation
Aachartkit Swift
📈📊📱💻🖥️An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、…
Stars: ✭ 1,962 (+5350%)
Mutual labels:  model, view
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (-2.78%)
Mutual labels:  view, model
universal-model-vue
Universal Model for Vue
Stars: ✭ 25 (-30.56%)
Mutual labels:  mvc, model
sym
A Mathematica package for generating symbolic models from data
Stars: ✭ 46 (+27.78%)
Mutual labels:  model, generation
Laravel Table
Generate tables from Eloquent models.
Stars: ✭ 101 (+180.56%)
Mutual labels:  generate, generation
Wpemerge
A modern, MVC-powered WordPress as a CMS workflow. 🚀
Stars: ✭ 348 (+866.67%)
Mutual labels:  mvc, view
Westore
更好的小程序项目架构
Stars: ✭ 3,897 (+10725%)
Mutual labels:  mvc, model
view
Yii view rendering library
Stars: ✭ 42 (+16.67%)
Mutual labels:  mvc, view
Dry View
Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
Stars: ✭ 124 (+244.44%)
Mutual labels:  mvc, view
Flexml
🚀基于Litho的Android高性能动态业务容器。
Stars: ✭ 225 (+525%)
Mutual labels:  mvc, view
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+244.44%)
Mutual labels:  view, model
Meteor Astronomy
Model layer for Meteor
Stars: ✭ 608 (+1588.89%)
Mutual labels:  model, mvc

CodeGen

A model-view based code generator written in Java. It is completely object oriented to encourage reuse and increase testability. If you have a lot of code that depends on the structure of a database, a file system or any other source of information, generate the code instead!

Download

To use CodeGen in your projects, add the following dependency to your pom.xml-file:

<dependency>
    <groupId>com.github.pyknic</groupId>
    <artifactId>codegen</artifactId>
    <version>2.4.5</version>
</dependency>

Example

System.out.println(new JavaGenerator().on(
    File.of("org/example/BasicExample.java")
        .add(Class.of("BasicExample")
            .add(GENERATED)
            .public_()
            .add(
                Field.of("BASIC_MESSAGE", String.class)
                .public_().final_().static_()
                .set(Value.ofText("Hello, world!"))
            )
            .add(
                Method.of("main", void.class)
                .set(Javadoc.of(
                    "This is a vary basic example of " +
                    "the capabilities of the Code Generator."
                ))
                .public_().static_()
                .add(Field.of("params", String[].class))
                .add(
                    "System.out.println(BASIC_MESSAGE);"
                )
            )
        ).call(new AutoJavadoc<>())
    ).get()
);

Result

/**
 * Write some documentation here.
 */
package org.example;

public class BasicExample {
    public final static String BASIC_MESSAGE = "Hello, world!";
    
    /**
     * This is a vary basic example of the capabilities of the 
     * Code Generator.
     */
    public static void main(String[] params) {
        System.out.println(BASIC_MESSAGE);
    }
}

Languages

Currently only the java language is supported, but the language-dependent code is contained in a single package so that more languages can be supported in the future. Most of the java package can probably be reused if the language in question is similair in syntax.

License

Copyright 2016 Emil Forslund

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].