design

Comparing records in file and reporting stats - Scenario 2

The requirements are : Fact 1 : We have some data files produced by a legacy system Fact 2 : We have some data files produced by a new system that should eventually replace the legacy one Fact 3 : Both the files are text/ASCII files, with records being composed of multiple lines. Each line, within a record, consists of a fieldname a...

Comparing records in file and reporting stats - Scenario 1

The requirements are : Fact 1 : We have some data files produced by a legacy system Fact 2 : We have some data files produced by a new system that should eventually replace the legacy one Fact 3 : Both the files are text/ASCII files, with records being composed of multiple lines. Each line, within a record, consists of a fieldname a...

What is the best way to ensure that all necessary class properties are set before returning an object which will be used somewhere else

I have a class that requires a specific method to be called before being used by other objects, this method implements all the required logic and sets the properties of the class to their respective values. How can I ensure that the method of this class is called before the object is returned for use by other objects? I heard that it is ...

How should SharePoint developers work with the graphics designer on their projects?

The graphics designers that I've worked with on SharePoint projects don't know/understand a lot of SharePoint. Particularly they don't know SharePoint Designer which is basically required for developing publishing sites. To get around this, I've found the following workflow typically eventuates: Use a web browser to save off a copy of...

UI/UX design or audit - how to measure the costs?

hi, lately I've been asked to do a UI or UX audit and to be honest I truly don't know how to charge people for this... The story is that I've used some portal X and I've started complaining about how unfriendly it is and they asked me to do a full audit for them... so I did... It took me 8h of writing a doc about what things are good an...

What should come first -- the design pattern or the code?

I'm starting on a fresh new project--should I look at my spec and decide which design patterns to apply, or just come up with a general idea of organization and allow the patterns to emerge organically through refactoring? In your experience, which technique will be most productive and have a greater chance of leading to clean elegant c...

Sould setter for delegate be in the interface ?

Hello, We have lot of object with this kind of design : Interface and several implementations, and use of several object by composition. Exemple : Foo implements IFoo and have a Bar object who implements IBar Foo also have a setBar(IBar bar) method for injection of dependancie. My question is : the setter sould't be in the interfac...

Design For a scenario

Hi Experts, Could someone please suggest me a best design for the following scenario: There are many numbers in a file, the file somewhat looks like: -1100 -1101 -1102 -1103 -1104 - - - - -Till 9999 Design and Develop a program in JDBC which will read all numbers from the file and insert into a table at database. Note: I don...

What should a main page of a web application be?

Designing a web application, how do you design the main page? By this I mean the page that is displayed to a user after entering the base url, like http://www.foo.com. It would probably depend on a website, but... stackoverflow welcomes us with list of questions, no silly what is stackoverflow landing page, last.fm prestens a kind of ...

Java: ArrayList for List, HashMap for Map, and HashSet for Set?

I usually always find it sufficient to use the concrete classes for the interfaces listed in the title. Usually when I use other types (such as LinkedList or TreeSet), the reason is for functionality and not performance - for example, a LinkedList for a queue. I do sometimes construct ArrayList with an initial capcacity more than the d...

Working with MDS Studio and Plazmic CDK

Hi, I want to know how feasible/flexible is developing rich UI based applications with MDS studio and Plazmic CDK? Or any other good GUI development tool is available for Blackberry? ...

Transferring legacy code base from cvs to distributed repository (e.g. git or mercurial). Suggestions needed for initial repository design.

Introduction and Background We are in the process of changing source control system and we are currently evaluating git and mercurial. The total code base is around 6 million lines of code, so not massive and not really small either. Let me first start off with a very brief introduction to how the current repository design looks. Pictu...

How do you prevent classes becoming 'dependency magnets' and God classes?

In virtually every project I've ever worked on, there will be one or two classes with the following properties: Extremely large with many many members and methods. Many other classes inheriting from this class. Many other classes otherwise depending on this class. Bad design, you might say. But in all cases, this wasn't the case at ...

Training a Junior Developer

I'm training a Junior developer. I would like to assign him with the task of designing and building an object oriented application. Are there any non-trivial sample exercises on the web which include good description of a problem and a suggested architecture diagram? ...

Order like a list but access by a key?

I used list to place cities into a trip. Then I iterate over the list to display the trip itinerary. I would like to access the cities by the name rather than by the trip order. So, I thought I could use a map rather than a list but the key determines the order. I would still like to control the order of the sequence but be able to acces...

ASP Menu bar, Static view

I am looking to create a menu bar with a specic type of "action" Similar to the bar on this website BBC Sport Its totally static and has no dynamic or "pop out" sections. When the top menu is clicked the page will re-load and display the lower level in a diffrent colour. Can this be achived with the Standard ASP:Menu control? I am ...

Is too much focus on testing benefits a bad thing overall?

What I mean by this, is that sometimes architects look to simplify and improve testability, at the expense of other important forces. For example, I'm reviewing a very complicated application, made so by extensive use of design patterns that overly favor testing, e.g. IoC, DI, AOP, etc... Now, typically I like these things, but this ...

Initializing a program using a Singleton

I have read multiple articles about why singletons are bad. I know it has few uses like logging but what about initalizing and deinitializing. Are there any problems doing that? I have a scripting engine that I need to bind on startup to a library. Libraries don't have main() so what should I use? Regular functions or a Singleton. Can th...

What is meant by open and closed layered architectures?

I know it probably sounds like very trivial question but I couldn't find any resources on the internet. Could you please tell me what are open and closed layered architectures and why open layered architecture is apparently more difficult to maintin? Are there any disadvantages of using closed/open layered architectures? ...

Making an existing site mobile friendly

So I am planning to make an existing website mobile friendly. The good part is that it is entirely text based with a few images which can likely be omitted from the mobile version of the site. The bad part is that it is a VERY complex site with a ton of pages (and each page can vary based on the data and the user accessing the site) A l...