Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Open Source] tinystruct framework v1.6.4 #2930

Open
m0ver opened this issue Apr 5, 2025 · 0 comments
Open

[Open Source] tinystruct framework v1.6.4 #2930

m0ver opened this issue Apr 5, 2025 · 0 comments
Assignees

Comments

@m0ver
Copy link

m0ver commented Apr 5, 2025

Project URL

https://github.com/tinystruct/tinystruct

Category

Java

Project Title

A lightweight java development framework

Project Description

A lightweight java framework designed for building efficient and scalable applications. Supports both command-line tools and APIs, enabling developers to create robust solutions with ease.

Highlights

It's lightweight on keep things simple and easy to be built. and support both CLI, API and Web applications with one code.

Example Code

package tinystruct.examples;


import org.tinystruct.AbstractApplication;
import org.tinystruct.ApplicationException;
import org.tinystruct.system.annotation.Action;

public class example extends AbstractApplication {

    @Override
    public void init() {
        // TODO Auto-generated method stub
    }

    @Override
    public String version() {
        return "1.0";
    }

    @Action("praise")
    public String praise() {
        return "Praise the Lord!";
    }

    @Action("say")
    public String say() throws ApplicationException {
        if (null != getContext().getAttribute("--words"))
            return getContext().getAttribute("--words").toString();

        throw new ApplicationException("Could not find the parameter <i>words</i>.");
    }

    @Action("say")
    public String say(String words) {
        return words;
    }

}

Screenshots or Demo Videos

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants