architecture

Compilation failed: throw an exception or do not?

I'm writing .NET On-the-Fly compiler for CLR scripting. And have a dilemma: is it better to throw an exception on build fail or not? So what is the best-practice point of view, which approach is more suitable? try { compiler.Compile(); // do not throws an exception only if build succeed } catch(CompilerException ex) { string err = ...

NHibernate N+1 select : architectural solution ?

Considering the following "database" : Post -> User The entities : class User { public virtual string Name { get; set; } public virtual IList<Post> Posts { get; set; } } class Post { public virtual string Title { get; set; } public virtual User Author { get; set; } } And the following service Layer: class UserServ...

Transparent google gears scenario validation

I want to use google gears, not for functionality but for optimization. I.e. if gears is detected in the browser side, then we will silently use it to do some optimizations and caching in the client side. If it isn't installed we silently work against the server only. Somewhere in the FAQ or help pages of our website we will tell the u...

What is information architecture? (What) has it to do with programming?

I've came accross this concept several times and did not find a clear explanation. What is it? What has it to do with programming? What has it to do with what we (software engineeers / programmers) call architecture? How can it help me? How can I put this to work for me? How is the professional that best understand this subject called? ...

Preventing Circular Reference

I have a wrapper project I created to talk to a 3rd party API. In another project, lets call it MyBusinessLayer.csproj. It uses this API by adding the wrapper project as a project reference so that it can use various classes to call API methods via HttpRequest / HttpResopnse. Now I need to do a bulk update by calling a wrapper class c...

Plug'N'Play Framework/Best practices

I need to rewrite an old webservice, which act as a Plug'N'Play repository for drivers. A request for a driver can return one or more objects depending on a range of identifiers. Could anyone recommend any best practices in regards to the architecture/design or perhaps existing frameworks or tools? I would think that this is a well known...

WCF: MessageContract, DataContract ... Confused?

Hi, I'm writing my first WCF service. I decided to write the service just as a DLL to begin with and then aspect the WCF stuff on afterwards which is where I am now. I was advised by the arcitect that I should stick to a specific format for message objects which I have done. However I've used Interfaces, complex types and lists thereof...

Database Primary Key C# mapping - String or int

In the Northwind Starters Kit, Primary keys from database are mapped to Strings in C#. Is this good practice? And if so, why? thx, Lieven Cardoen ps: Sorry for the maybe wrong question... In Northwind Starters Kit some tables have a auto-incremental primary key with datatype int and others have a non auto-incremental primary key wit...

When storing Images in the File System, Use relative paths or absolute paths?

I am working on a web app and I decided (after reading many post on SO) to store the actual images in the file system and to store the metadata in the DB. Should I store a relative path or an absolute path. I can think of some advantages for each of the choices. Absolute: Pros: It is obvious where the file is even to other apps read...

How would you get a list of all the applications at your company?

Hi Everyone, (Updated: I've moved this over to ServerFault) I'm responsible for maintaining a list of all the applications in my company (about 250). The range is from HR systems that track 80k employees, to manufacturing-type systems responsible for hundreds of millions of dollars of revenue, to web applications with a small user bas...

Software Systems Ranked in order of Complexity & Difficulty

I was involved in a discussion at work about which software systems various people had built were the biggest; biggest in this case being a combination of system complexity and implementation difficulty. Since experienced programmers tend to get a gut feel for a project's size, even if they wouldn't put it in writing, I thought I'd pose...

How should a custom view update a model object?

This is a Cocoa n00b question - I've been programming GUI applications for years in other environments, but now I would like to understand what is "idiomatic Cocoa" for the following trivialized situation: I have a simple custom NSView that allows the user to draw simple shapes within it. Its drawRect implementation is like this: - (vo...

Python Virtual Machines architecture diagrams/references

Someone could point out sites/books where I can find introductory documentation about the architecture of the Python VM? I'm interested in the C version, but if there are easy-to-follow references about other implementations it could be helpful too. I'm trying to find any kind of resources of higher level than plain source code (howev...

Effectively Design a Simple Mail Client

Requirement : JAVA desktop mail client which could connect to existing gmail,y! mail a/c & will allow receive/send mails, support offline view of mails, plus with more features as & when it comes. i am using Java Mail Api's Underlying Mail Storage: I have decided to use HSQLDB with Hibernate. Email content can have attachments , HTML ...

C# - using polymorphism in classes I didn't write

What is the best way to implement polymorphic behavior in classes that I can't modify? I currently have some code like: if(obj is ClassA) { // ... } else if(obj is ClassB) { // ... } else if ... The obvious answer is to add a virtual method to the base class, but unfortunately the code is in a different assembly and I can't m...

Any good book or web resource about software architecture?

I've created a service which enables users to connect to the server with mobile phone and send some data. Now I have to prepare a formal service presentation - present the whole architecture, how the data are exchanged and then also the complete presentation of the client side and server side. So far I haven't written any formal document...

NHibernate ManyToMany relationship that includes all of one side of the relationship

Given this db schema (it was handed down to me): I'd like suggestions on how to both model this and map it using fluent-nhibernate. The only thing I can come up with is a very active record style of modeling (a class for each table and the obvious associations). Ignoring the db for a second though, I think I want every facility to a...

Good textbooks on "Computing Architecture"?

I am going to teach my first undergraduate class on "Computing Architecture." I guess that this is not quite a proper term because other related terms, like Computer Architecture, usually refer to low-level structure of computer system. Architecture in "computing architecture" is used as in software or system architecture. Actually this...

Any advantage of one architecture over another for array intensive computing?

I am curious to know if there exists an architecture that is quicker for handling array intensive calculations. For example; will some arbitrary C code ran on a MIPS workstation complete quicker than when ran on a x86 workstation? I suppose a better question is do some architectures have a faster FPU? I am aware that one of the newer o...

Search engine, asp.net mvc, Domain Driven Design

Going to develop a search engine. I'm wondering how my DDD should look. Sorting records should be implemented, but i don't want that my views knew about my database structure (by which columns to sort). As far as i understand - sorting information should come from infrastructure layer, from repository implementation, so there have to be...