Skip to content

NFramework v1.0.0 – Lightweight Networking Framework for Java πŸš€

Latest
Compare
Choose a tag to compare
@Mohammeddaniyal Mohammeddaniyal released this 26 Mar 12:50
· 2 commits to main since this release

NFramework is a simple, annotation-based networking framework that enables seamless client-server communication using a custom request-response model. It allows direct method invocation on the server, making it an efficient alternative for lightweight applications.


πŸ”₯ Features

βœ”οΈ Annotation-based API for defining endpoints.
βœ”οΈ Custom request-response model for optimized performance.
βœ”οΈ Automatic method invocation on the server.
βœ”οΈ Lightweight and dependency-free – only requires the included JARs.
βœ”οΈ Simple client execution with execute() calls.


πŸ›  Installation

1️⃣ Download the JAR Files

Get the latest NFramework Server & Client JARs from this release.

2️⃣ Include Them in Your Project

Run the server and client using the following commands:

# Running the server
java -cp nframework-server.jar BankService

# Running the client
java -cp nframework-client.jar BankClient

3️⃣ Implement Your API

Use simple annotations to define server methods.


πŸ“Œ Example Usage


πŸ–₯️ Server Code

πŸ“₯ Required Imports

import com.thinking.machines.nframework.server.*;
import com.thinking.machines.nframework.server.annotations.*;

πŸ›  Implementation

@Path("/banking")
public class BankService {
    @Path("/branchName")
    public String getBranch(String city) {
        return city.equals("Mumbai") ? "Colaba" : "Unknown Branch";
    }
}

πŸ’» Client Code

πŸ“₯ Required Imports

import com.thinking.machines.nframework.client.*;

πŸ›  Implementation

NFrameworkClient client = new NFrameworkClient();
String branch = (String) client.execute("/banking/branchName", "Mumbai");
System.out.println("Branch: " + branch);

⚑ Future Improvements

πŸ”Ή Configurable ports (currently hardcoded to 5500).
πŸ”Ή Improved error handling for better debugging.
πŸ”Ή Async request handling for better performance.


πŸ“’ Try it out and let us know your feedback! πŸš€