Questions tagged [design-principles]

Design principles are ideas that guide developers toward certain goals in software design.

Software has many different desirable quality aspects -- among them are reliability, security, maintainability, efficiency, and size; and these are all impacted by choices made by the developers. Software design principles tend to focus on the maintainability aspects of quality: is the code loosely coupled, or does it have many dependencies that make it hard to use? Is the code highly cohesive, or is a collection of unrelated information needed to use a module? Is the code readable and understandable? Is the code testable? Is the code usable and reusable? Is the code simple or complex?

Various design principles can be used by developers to advise them in making choices that will yield highly cohesive, loosely coupled, simple, maintainable designs. The SOLID design principles are an example of specific design advice for object oriented projects. The Principles of User Interface Design provide design advice for creating user interfaces.

309 questions
0
votes
1 answer

principles of Autosave

I have a form that users can use to submit a report. As one of the fields is a text area where they can place quite a long text, I would like to insert a function that autosaves the entry every minute or so, but I'm not sure about the principles…
Patrick
  • 1,265
  • 7
  • 21
  • 33
0
votes
1 answer

Best practice when it comes to class separation vs. access modifiers

As I'm sure the title is less than clear, I'll elaborate on my question. I am currently in the middle of a software development project that involves image processing for letter recognition. One of the more primitive feature extraction methods…
TheMerovingian
  • 648
  • 4
  • 14
0
votes
2 answers

is this Service layer violating SRP principle

I am developing a Web App in Spring and hibernate. I am loading entities in Database.Authors,books,Publication etc are my entities which are getting loaded from excel. I have mode one Entity Load Service interface and then I have its Implementations…
beinghuman
  • 2,088
  • 7
  • 27
  • 36
0
votes
2 answers

COdeIgniter structure for login & registration

I am creating a login & registration system using CodeIgniter. Currently I have a Model, View and Controller for login, with functions to validate, check username, etc and an registration model, view and controller, that does the registration. I…
Vforquest
  • 121
  • 1
  • 2
  • 4
0
votes
1 answer

When to throw an exception and when to just return?

Sometimes functions fail to do what they say they do. When this happens, some functions throw an exception (e.g. PDO constructor) and others just return (e.g. mysql_connect would return false). I have many times had to choose between one of these…
Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201
0
votes
2 answers

Underline or no underline

I am having a discussion with an AD regarding an info page for a store in an iOS app. On this info page we use an grouped UITableViewController showing information such as address, phone number, email address and more. The top shows a mini-map with…
Paul Peelen
  • 10,073
  • 15
  • 85
  • 168
0
votes
1 answer

How to use open closed principle for web page operations invocation in java?

I have a web page where users can fill in and submit forms:
.............
user710818
  • 23,228
  • 58
  • 149
  • 207
0
votes
2 answers

Search Parameter

I have a screen which does a basic search on a database employee table. User will search by First Name, Last Name, Department, IsActive, etc. As of now I have created a SearchParameter Class : public class EmployeeSearchParameter { public…
Murali Murugesan
  • 22,423
  • 17
  • 73
  • 120
0
votes
2 answers

An event system - like signal / slot in Qt without forking - C++

I would like to know how to design a system that can offer a solid framework to handle signals and the connection between the signal/s and the method/s without writing a really unpleasant cycle that iterates over and over with some statement for…
user1797612
  • 812
  • 6
  • 22
0
votes
1 answer

Design philosophy and best practies of a restful api

I'm have the fortunate option to redesign our main project public api. What started as a goal to make a restful api, have [after a lot of extra added features] ended up as a rest/json-rpc mismatch. So, time to rethink and redesign. However I need…
ztripez
  • 664
  • 6
  • 24
0
votes
1 answer

How does High Cohesion help us reduce Coupling?

Assume methods M1 and M2 have strongly related responsibilities First example: If • M1 and M2 are defined within class A ( thus class A is highly cohesive ) • class B uses A.M1 and class C uses A.M2 then • A is coupled with both B and C classes •…
user1483278
  • 929
  • 1
  • 9
  • 17
0
votes
1 answer

using DateTime.Ticks instead of DateTime itself, Is this a good practice?

Possible Duplicate: Should I store DateTimes as a Long (Ticks) in a database? It is OK to use DateTime.Ticks instead of DateTime itself for implementing DateTime based operations? For example changing type of database column from DATETIME into…
Sadegh
  • 4,181
  • 9
  • 45
  • 78
0
votes
2 answers

Single Responsibility Principle: Should I separate my bibliography class in Reader, Writer and Container class?

cowboy coder needs some help from SO-veterans: I have a given application that uses a bibliography which is read from a file (in reality, it can be different files but let's assume a single file only). I build a new application that should use the…
0
votes
1 answer

PHP - Is this proper use of exceptions for error handling within classes?

I've searched plenty on this topic and have gotten a lot of good (but different) results. Some of the results weren't quite related and it does seem to be a matter of preference in the end, but I'm interested in if I'm following good design…
-1
votes
1 answer

interface, interface client, vs inheritance, Software design principles, compoment packaging issue

I came across one issue as to how to package interface, interface client and inheritance. That is, in the book below, author mentioned that Switachable is more appropriate to deploy with Switch together as a component, rather than Light. What I…
Pingpong
  • 7,681
  • 21
  • 83
  • 209
1 2 3
20
21