In my quest to transition from a decade of C++ to Ruby, I find myself second guessing how to accomplish the simplest things. Given the classic shape derivation example below, I'm wondering if this is "The Ruby Way". While I believe there's nothing inherently wrong with the code below, I'm left feeling that I'm not harnessing the full p...
I want to take HttpContext.Current.Request and HttpContext.Current.Session and wrap them together into one class.
Basically i want to write col["key"]; and have it check one of these for the key and if it doesnt exist to check the other.
AFAIK they don't share an interface (i looked around using "Go To Definition" but i am pretty bad)....
As title says, i wonder if you could you direct me to some document, or give me advice here, on designing (GUI design) form which main part is occupied by jtable, which has several filters.Main goal is to avoid visual clutter.
...
Title says it all... we've debated this without any progress.
Closest related questions I could find:
How many parameters are too many?
Worst Java practice found in your experience?
What “bad practice” do you do, and why?
...
Can you suggest/reffer to any general design examples for implementing run-time changable themes in a GUI system? This seems to be quite a challenge. However, many GUI systems out there present this kind of functionallity, so there must be general design ideas that could be followed.
Just to be 100% clear, design stands for programatic...
This question is regarding object oriented design. It may fit into community wiki.
Usually , when one design a set of classes which communicate with each other through interfaces , he ask himself , what Interfaces should I make? How to abstract various sub-components in the system in order to achieve the design goals.
If we put aside p...
Hy guys. I've created a simple blog app with the usual CRUD actions. I've also added a new action in the PostController called "archive" and an associated view. In this view I want to bring back all blog posts and group them by month, displaying them in this kind of format:
March
<ul>
<li>Hello World</li>
<li>Blah blah</li>
...
I'm working on this application that's sort of like a blog. I'm thinking about doing a thing where the user can scroll through all their posts using an "endless scroll" functionality like Google Reader has.
Here's the problem I'm anticipating... if the user clicks on a post to edit it, that will take him/her to a new page. Soon enough t...
hi
in the current application im working on the client requested that we will save history of every action that happended in the system and provide the ability to backtrack to the previous state of the information.
for example: lets say that my app need to handle a storage-room and each user can add/update/delete/read (all CRUD) the inv...
Suppose that we have a table for saving human-being data (Human Table)
The human table has a column named "relatives" in order to save what type of relatives the human is supporting. The relatives column can have 2 values:
1: means that "close relative"
2: means that "far relative"
Now, imagine that user can select one choice between cl...
I've read a lot of books on software design, and more and more I'm wondering if what I learned about separation of concern between business object and serialization makes me more productive.
I'm influenced by Domain Driven Design, so when I design my business classes I don't think about persistance. The only objects who are coupled to m...
The status bar has grown, so parts of my interface get cut off. Any pointers on how to fix this (e.g. using autoresize masks, etc.)?
I use Interface Builder for the UI, so everything is .xib's.
...
Hi,
I´m starting to developing with cake php. I have designed a DB model and baked my mvc´s.
Now i want a index / home site. This site should be an overview of possible actions which a user can do.
Should I use an app_controller for that or route to an existing controller even if that controller has nothing to do with a home site, or ...
Hello!
I am currently in the process of learing about Java EE, EJB3 and . So far I am running a JBoss application server and a Oracle database. I have written a stateful session bean which retrieves data from the database through JPA entities.
My goal is to have a simple client speaking to a server by calling methods in a stateful bea...
During a code review I looked at set of repository classes (in vb.net). I am used to seeing these repository classes full of functions that return collections (among other things) of your domain objects. However, this repository had 1 public property and 1 private variable that looked something like this:
Private _item as Collection (of...
Hello SO Team:
We are in the process of starting a new company website and the question was brought to use or not a Content Management Solution. What will be the factors to consider to be able to debate between this two options.
Both of them have pros/cons, but I am sure that there has to be a few people out there that will have an ex...
I want to implement a function in the base class but I also want it to be overridden in the derived classes everytime. So it is more like "abstract function but with a body".
What am I looking for? Am I looking for the right thing?
...
I often see two conflicting strategies for method interfaces, loosely summarized as follows:
// Form 1: Pass in an object.
double calculateTaxesOwed(TaxForm f) { ... }
// Form 2: Pass in the fields you'll use.
double calculateTaxesOwed(double taxRate, double income) { ... }
// use of form 1:
TaxForm f = ...
double payment = calculateT...
I am about to develop a program which will be installed and run as a Windows Service on the back-end servers (with internet access) of several clients. I do not have physical access to the servers. What I am working on is a scheme for reliably rolling out updates to the program.
I have spend quite a lot of time looking for best practice...
To be clear, I'm not asking if/why multiple inheritance is good or bad. I've heard a lot of arguments from both sides of that debate.
I'm wondering if there is any kind of design problem or scenario in C++ in which multiple inheritance is either the only way to accomplish something, or at least is the most optimal way over all other alt...