-
Notifications
You must be signed in to change notification settings - Fork 5
Getting Started
-
Optimize productivity The primary goal of AppOps is to optimize development productivity while retaining high performance of the backend and to make thing overall simpler. We intend to use instrumentation wherever possible to simply stuff such as using a generator to generate it's client TypeScript interface from a Java Service interface.
-
** Keep it simple ** Our next goal is to keep backend development as simple as possible. DI frameworks such as Google Guice already provide simplified component / application development. As of now we bring on top a very simple service architecture that allows you to develop backend services in minutes and invoke them from client.
-
** Long life codebase ** Our last goal is to make sure resulting application code base have much longer life by guiding them into using best practices and patterns. Thus resulting in easy to maintain codebases
AppOps client projects are typically maven multi module projects consisting of multiple services.
To illustrate, we'll build a Library service. it is an interface that becomes my service interface to be invoked from the client and Library service contain method declarations. This is implemented by LibraryServiceImpl class.
This is the interface client code will invoke using TypeScript or other client technologies e.g.
public interface LibraryService { public List<Book> getAllBooks() ; }
@Service public interface LibraryService { public List<Book> getAllBooks() ; }
public interface LibraryServiceImpl implements LibraryService { public List getAllBooks(){ ArrayList someBooks ; // fetch book list and assign to someBooks return someBooks ; } }
` public class LibraryModule extends AbstractModule {
public void configure(){
bind(LibraryService.class).to(LibraryServiceImpl.class);
}
}`
Lets you define a service with all it's bindings. You can bind multiple Services to their implementations in a single module. You can also have as many modules as you need in a single service project. This module is a straightforward google Guice module. So please refer to Guice documentation for more further details.
Once you are ready with this. All you need to do is package this project as a jar and add its dependency to the gims-ui project.