matus-m / nlighten Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Implement a DAO service that could perform basic CRUD operations on given entity. The class should be generic, with entity class as generic type. Inject the EntityManager
and implement the basic DB operations.
Few notes: distinguish between persist(create) and merge(update), search for implemntations on github or use Spring CRUD repository as an inspiration
DAOException hides the cause by ignoring it in its constructor:
public DAOException(Enum<?> messageKey, Object... arguments) {
this.messageKey = messageKey;
this.arguments = arguments;
}
Either check the array args for the presence of exception, or add cause
as required constructor param.
Also remove all constructors, that take String
as argument. It is pointless to allow raw strings as parameters, as there is no way to i18n them. Only allow enums, Exceptions, and params.
Our course related work will require a robust way to upload and download assets associated with lectures, assignments etc.
A very general requirements:
First phase should just focus on the basic requirements: store the file, link to entity, and download.
In a bigger picture we should consider:
lets take a course presenter. He would like to store presentation assets for every lecture, upload assignments and demo code for students, etc. If there are many files the management might get ugly - he might want to track different versions, revert to older file, etc. Think of the features that dropbox or google drive has. is there a way to integrate any of these services? How about a git repo for every lecture/course?
ATM the lombok is incompatible with the model mapper we use. Basically, the annotation processor of the mapper does not see any of the getters/setters generated by lombok.
We need to check,what are our options.
Once a live event has started, the system should keep students in sync with the presenter/lector. E.g. when presenter switches to next slide, the application should switch to next slide on all browsers for students. To do this, we need a robust websocket mechanism, that would manage the live event.
Goal:
Define a component - presumably CDI bean, that gets created once the event starts, store info about all connected peers - presenter, students, allow receiving messages from clients(switch to next slide, question asked, content change....) , allow sending broadcast messages(e.g. to all connected students).
Research: pub/sub at scale, Jee websockets, custom websocket server, etc.
what we need:
Criteria for evaluation:
Possible search tags: binaryjs, hls, webrtc
Long
idjavax.ejb.EJBContext.getCallerPrincipal
(you need to do a lookup for this)In test code, prepare a test case for this feature, crate a test entity, implementing your Traceable superclass and try to save it with em.persiste/merge. Test that the interceptor creates the timestamps...
We need to prepare a domain model for Lectures. Right now we need just the few basic entities, that we will expand later. The exact entities are up to you, but I would suggest something like this for start:
Also create DAO classes as @Stateless
no-interface session beans extending DAOService
from #16.
Do not worry about the audit attributes - creation user, date etc as these will come from parent class once #2 is implemented.
The unit tests for DB layer seem to work fine, however we do not have any tests for REST api. Any suggestions how to implement them?
Goals:
In order to ease the devops, our app should be distributed as a docker image.
Goal: 1st phase
define a simple docker file, that extends some well know image(redhat wildfly images, centos, ubuntu, etc...), add JVM, wildfly and our backed app as war producing a single Docker image. Document this and test.
2nd phase:
Create entities for Users/members and security tokens.
Things to consider:
@Stateless
no-interface session beans extending DAOService from #16.If you want , implement a portable CDI extension that would list all available beans during app startup and log them to console. Make it enabled/disabled based on some system variable, e.g. NLIGHTEN_CDI_DEBUG=true
Create a new arquillian container that would add required java arguments to the server, so that it listens for debugger connection.
Create a maven profile, that would turn on this arquillian profile.
Since WF 10 final is out, we should update the maven & arquillian to the new version.
String message = I18nUtil.translate(MyCoolEnum.ERROR_DUMB,"EN")
src/main/test
prepare a test enum, test properties and test the results.we will need an email notification service for many use cases within the app.
Our requirements:
basically the solution should have two parts: a robust templating mechanism(research available templating libs[freemarker, thymeleaf, moustache...] and make a suggestion) and a business service that will send the email based on template, variables and language.
have a look around the interwebs, hwo do others solve it, what are some chalanges in html email messages, template engine benchmarks.... any suggestions are welcome.
Right now the webcontext URL of the project is not configured. we should define it via jboss-web.xml
Add REST resources with basic CRUD methods following the REST principles. Additionally, create arquillian test cases for these new classes.
The idea is to setup a staging env on openshift public cloud. Create a new account on openshift, add new remote repo and perform the necessary changes in mvn build to get it working. First step should be to just get it deployed on openshift wildfly cartridge without any errors.
We have a model for courses and lectures. Now we need to extend it to support scheduling of live events (webinars, etc).
The goal is to:
After the app gets deployed to some non-dev environment, the DB schema and data will no longer be generated. In order to automate the deployment process, we need to employ some kind of DB evolution mechanism.
Goals:
Research tags: flywheel, liquibase, JPA scheme gen, blue-green deployments, ...
/rest/v1
application path/rest/v1/apistatus
that returns a JSON object with current time, and Health status message, e.g.{
"status" : "OK",
"serverTime" : "12-12-2015 0:00:00"
}
if you want create a debug filter that logs whole body of POST/PUT requests as string to the console.
Only enable this if a specific system param is set, e.g. NLIGHTEN_REST_DEBUG_REQUESTS=true
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.