Click here to Skip to main content
15,892,298 members
Home / Discussions / Java
   

Java

 
GeneralRe: THREADS Pin
Richard MacCutchan25-Aug-12 21:33
mveRichard MacCutchan25-Aug-12 21:33 
QuestionRead Barcode from mobile and show the product type Pin
Sahil Mahajan Mj24-Aug-12 22:47
Sahil Mahajan Mj24-Aug-12 22:47 
AnswerRe: Read Barcode from mobile and show the product type Pin
TorstenH.25-Aug-12 0:58
TorstenH.25-Aug-12 0:58 
GeneralRe: Read Barcode from mobile and show the product type Pin
Sahil Mahajan Mj25-Aug-12 1:17
Sahil Mahajan Mj25-Aug-12 1:17 
GeneralRe: Read Barcode from mobile and show the product type Pin
TorstenH.27-Aug-12 3:07
TorstenH.27-Aug-12 3:07 
QuestionAlarm in android app Pin
ljpv1421-Aug-12 12:09
ljpv1421-Aug-12 12:09 
AnswerRe: Alarm in android app Pin
Peter_in_278021-Aug-12 12:43
professionalPeter_in_278021-Aug-12 12:43 
QuestionSOLID principle problem Pin
Neo1010121-Aug-12 7:36
Neo1010121-Aug-12 7:36 
I'm stuck with applying the SOLID principle in my code.

Problems:
1) I don't want to violate SRP, so I don't know if the protected members of AbstractScreen are violating this

2) My screen interface should not have this many responsibilities, I probably need to remove them

3) I decided to make a DocumentLoader class to take care of providing my screens with the input and output documents they need in order to display something on the screen. What is displayed depends on the input and output file I give it. Thus I made the DocumentLoaderInterface, with loadDocuments(List<document>).

This is my real problem: where am I going to put the implementation of loadDocuments() if it varies per screen? I can't posssibly go put this code in a screen, because that will give the screen too many responsibilities. If I implement it in the DocumentLoader class, then only one implementation will be available, unless I make several DocumentLoader objects.

Where do I instantiate them? If I call documentLoader.loadDocuments(); then where is the implementation going to be? How do I implement this?.. I'm really stuck.

Please find below my code structure:

package screens:
Screen

AbstractScreen
CSS
protected Document inputDocument, outputDocument;
protected SAXBuilder parser;
protected ComponentService componentService;
protected DocumentLoader documentLoader;

ScreenInterface:
C#
public Document getScherm();
public void addComponents();
public Object getC(String key);
public void loadDocuments();


package ui:
Java
TestUi


package utils:
Java
ComponentService
UtilityFactory


package xmlio:
Java
DocumentLoader
DocumentLoaderInterface
XmlIo
XmlIoInterface


//Application Goal:
Have a GUI draw a XAML screen depending on the input XML document. Different documents will produce different charts.
AnswerRe: SOLID principle problem Pin
Nagy Vilmos21-Aug-12 7:57
professionalNagy Vilmos21-Aug-12 7:57 
QuestionObject parsing non-static Pin
Joshua Waring20-Aug-12 23:11
Joshua Waring20-Aug-12 23:11 
AnswerRe: Object parsing non-static Pin
Nagy Vilmos21-Aug-12 6:48
professionalNagy Vilmos21-Aug-12 6:48 
AnswerRe: Object parsing non-static Pin
jschell21-Aug-12 8:40
jschell21-Aug-12 8:40 
QuestionIs it a bug or featuere Pin
Amarap18-Aug-12 0:58
Amarap18-Aug-12 0:58 
AnswerRe: Is it a bug of featuer Pin
Manfred Rudolf Bihy18-Aug-12 2:11
professionalManfred Rudolf Bihy18-Aug-12 2:11 
AnswerRe: Is it a bug of featuer Pin
Gerben Jongerius18-Aug-12 2:12
Gerben Jongerius18-Aug-12 2:12 
AnswerRe: Is it a bug of featuer Pin
Eddy Vluggen18-Aug-12 2:28
professionalEddy Vluggen18-Aug-12 2:28 
AnswerRe: Is it a bug of featuer Pin
TorstenH.18-Aug-12 3:22
TorstenH.18-Aug-12 3:22 
AnswerRe: Is it a bug or featuere Pin
Gowtham Gutha15-Nov-12 7:25
Gowtham Gutha15-Nov-12 7:25 
Questionproblem while updating a file Pin
Namdeo Badhe17-Aug-12 7:07
Namdeo Badhe17-Aug-12 7:07 
Answerdouble post Pin
TorstenH.17-Aug-12 9:00
TorstenH.17-Aug-12 9:00 
Generalproblem while updating a text file in java Pin
Namdeo Badhe17-Aug-12 6:45
Namdeo Badhe17-Aug-12 6:45 
GeneralRe: problem while updating a text file in java Pin
Richard MacCutchan17-Aug-12 6:59
mveRichard MacCutchan17-Aug-12 6:59 
QuestionMessage Removed Pin
16-Aug-12 6:53
Member 936232116-Aug-12 6:53 
QuestionSwing Pin
Joshua Waring15-Aug-12 23:53
Joshua Waring15-Aug-12 23:53 
AnswerRe: Swing Pin
pasztorpisti16-Aug-12 0:28
pasztorpisti16-Aug-12 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.