rest - Spring Enterprise Application Best Practices -


after read gordon's article best practices build enterprise application using spring framework, share ideas service layer.

my architecture represents gordon described in image http://gordondickens.com/wordpress/wp-content/uploads/2012/07/spring-app-layers.png

the application complex, has heavy business rule , demands use different resources database, soap, rest , file handle in same use case.

for scenery have described above, have service class needs perform soap , rest requests , handle database data. so, have autowired in service class soap , rest component , repository handle database stuff.

i'm concerned if best approach handle integration between services , resources soap, rest, database , etc.

thanks

so, have autowired in service class soap , rest component , repository handle database stuff.

sounds problematic though work.

think dependency between layers. service layer depend on repository layer (business logic layer depend on data layer). service integration layer (or service communication layer) incoming requests depend on service layer. data layer not depend on service layer. nor service layer depend on inbound service invocation layer.

so, remove soap , rest components service class. soap , rest components, wire service instance (i.e. avoid soap , rest components wired service, in reverse direction).

this way, when want support integration protocol (say jms), such work not modifying service.

your data access seems fine. hope service accesses repository via daos.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -