Sergio Trevino wrote:
1. As far as applications are going to work in the offline mode, I need to somehow persist changes. I decided to apply the CQRS approach for this task.
CQRS may be a good choice, but as far as I known it's quite unrelated with offline / online data synchronization - generally speaking it deals with differentiating the data model you use for reading data from the model you use to write data.
The problem of synchronizing data from offline to online status in well addressed in many Javascript frameworks, despite the actual choice you're going to make, I suggest you to have a look
at Apache Cordova's way of dealing with this problem.
Sergio Trevino wrote:
So all in all, could you please suggest whether my ideas make sense ? And maybe you could suggest technologies to study to follow best practices used for developing enterprise applications specifically related to Java EE.
Generally speaking, following Java EE best practices is already a good start. Since you are a novice, I suggest you to follow Oracle Java EE tutorial.
This said, I'm afraid that nothing more than concrete experience could teach you about best practices. A good amount of practice - and why not, even a fair good dose of one's own mistakes and errors - is required to deeply understand architectural
patterns.
My best advice is to keep the whole design simple (but never simplistic !!) and the neater you can. Avoiding to mix business logic and GUI logic is already a good result - believe me, it's not so easy in real world scenario when you are in a great hurry !
Second, an architecture is a mean to achieve a result, not the goal of your work. So, it needs to be effective, not to follow necessary the last hype in the IT skyline.