design

font-replacement services for Helvetica Neue

Hello! A project I'll be working on in the near future requires me to do some font replacement for some headings and small portions of the copy (blockquotes, etc) The catch is that the designer wants to use Helvetica Neue. I've looked at Typekit, Fontdeck, Google Fonts, and FontSquirrel and they don't seem to have said font nor anythi...

Java Abstract Class or Static Utility Class Design Choice

I am implementing a few strategies (Strategy Pattern) which have some common behavior and am undecided where the common operations should live. Assuming I 1 context and 3 strategies, some of the operations used in the strategies are shared, some are needed only by 2 others just be 1 of the strategies. There is no member level state s...

Good Way to Handle Many Different Files?

I'm building a specialized pipeline, and basically, every step in the pipeline involves taking one file as input and creating a different file as output. Not all files are in the same directory, all output files are of a different format, and because I'm using several different programs, different actions have to be taken to appease the ...

Threading Architecture Question C++ Message Passing

Simple question, I think. I have one thread that responds to a callback that is called when a user connects via TCP. That callback wants an answer if I accept or reject the login. Problem is I have to send a login request to a security server via asynchronous message passing and wait for a response. What is the best way to handle t...

How to set d:DesignInstance to a generic type ?

Hello all, An easy one ;-) I declared: xmlns:om="clr-namespace:System.Collections.ObjectModel;assembly=System" I try to set a generaic as the DataType: <DataGrid d:DataContext="{ d:DesignInstance Type=om:ObservableCollection&lt;System:Int32&gt;}" /> But I'm receiving an error: "Invalid format for a type". Anybody ha...

Design question: Different types of transactions in a system

In my framewrok I have an ITransaction interface. It implements some basic operations like Commit() and Rollback(), it is being used for flat files and other data sources. However NHibernate has an ITransaction interface as well. It is not the same as my interface since there are some database specific methods but there are similarities....

Using related functions in one class

Hello guys, I have a class with two related functions (methods): public class class1 { public void SubscribeToListOfEvents() { // .... } public void UnSubscribeFromListOfEvents() { // .... } } What's the best practice to use related functions in one class ? Do you know of any implementations...

What is the use/advantage of function overloading?

What is the use/advantage of function overloading? ...

Communication between client class library and web service / web service and server class library

Wondering what others do / best practice for communicating between layers. This question relates to communication between layers 2-3 and 3-4. Our Basic Architecture (in order) as follows: UI Front End Business Classes Web Services Back End Business Classes DAL The web services are just a façade that include logging and authenticatio...

Force execution of parent's method before child's method without explicit call

Hi, I'm working on a c++ app and I'm facing a problem: I have a class B derived from the abstract class A that has some event handling methods. A third class C is derived from B and must reimplement some of B methods. Is there a way to implicitly call B's method before calling C's one? Class diagram: class A { virtual void OnKeyPr...

Does code contracts really help unit testing?

I have fair amount of knowledge on unit testing. I have been trying to read about code contracts. Does it really help unit testing? Is it over-rated especially when we talk about code-contract helping to do unit testing. I am specifically referring to contracts in .net 4.0. I use nunit for unit testing. ...

Disabling or hiding controls design guideline?

I have checked the design guidelines from the Android developers recently and found the recommendation to use at least 4 states for interactive ui elements. default, disabled, focused, pressed see http://www.slideshare.net/AndroidDev/android-ui-design-tips, slide 13 On the other hand in slide 10 it is said to make the right things vis...

How to handle a java class with hundreds of fields?

I'm trying to design a program that uses a third party API. The third party API describes an input with 296 fields, and an output with 179 fields. Obviously I want classes to represent the input and output. Are there any tricks to designing a class with so many fields? Should I have a normal getter and setter for every field? Note: ...

Guidance on designing a solution - XML files vs database

I am thinking of storing bunch of data in XML files. Each file will has information about a distinct element lets say contacts. Now I am trying to do retrieve a contact based on some information eg: Find all the contacts who live in CA. How do I search for this information? Can I use something like LINQ. I am seeing XElement but does it ...

How do I get the size of a file after ftp'ing ?

CFtpFileFind finder(mConnection); found = finder.FindFile("*.log"); while (found) { found = finder.FindNextFile(); wsprintf(fileInfo, "%s", finder.GetFileName()); //need file size of this .log //no member function for this in CFTPFileFind class? } EDIT Answer finder.GetLength(); ...

Client/Server are always separated! Or are they?

Its amazing how many programmers in the greater community of programmers ask questions like "How do I do an EXTJS backend?" or "How do I integrate jQuery with Java?", not understanding the distinction between the client and the server. Then I got to thinking, are there frameworks where the server actually sends JS or something to the cl...

How to deal with different ownership strategies for a pointer member?

Consider the following class structure: class Filter { virtual void filter() = 0; virtual ~Filter() { } }; class FilterChain : public Filter { FilterChain(collection<Filter*> filters) { // copies "filters" to some internal list // (the pointers are copied, not the filters themselves) } ~Filter...

How can this circular, bidirectional dependency be resolved?

I have a RequestHandler class and a RequestListener class. A RequestHandler creates a RequestListener and passes it a reference to itself. The RequestListener in turn calls methods on the RequestHandler to handle requests of different types when they are processed (eg handleTypeARequest(), handleTypeBRequest() and so on). Unfortunately, ...

Is it considered bad practice to use a widgets title attribute to refer to it?

Would it be considered bad practice to use a widgets title attribute to refer it? For example I have a number of custom radioBoxCtrls on a panel I only ever need to get/set all the values at once so the container class(a panel) for the radioBoxCtrls objects has the following methods get_options() set_options() To set options for...

How do I get started in graphics design side of web design?

In past years I have learned the most important languages for web development (CSS, HTML, JS, PHP) and I can create good-structured sites. But an important part of web design is the images used for buttons, backgrounds, text, gradients... Also the main logo is a very important element in the layout of a website. However, I dont know...