Questions tagged [design-guidelines]

89 questions
6
votes
1 answer

Azure/AWS ORM Design Guidelines

I'm designing and implementing .Net ORM that must support both Azure Storage (tables, queues, blobs) and AWS Storage (EBS, SimpleDB, S3) and hide all implementation details behind a common interface. The major design goal is simplicity. Some of the…
andriys
  • 2,202
  • 2
  • 19
  • 24
6
votes
1 answer

Why does spring prefer unchecked exceptions?

while studying spring I stumbled over this question. Java supports both checked and unchecked exceptions. Language-agnostic design guidelines seems to favour unchecked exceptions. This question is why using an inversion of control-container like…
Jesper
  • 304
  • 6
  • 10
5
votes
1 answer

Integrating Google pay buttons and Apple pay buttons into react-native application

I have been searching everywhere on how to integrate the native assets provided by Apple (PkPaymentButton) and Google Pay ( https://developers.google.com/pay/api/web/guides/brand-guidelines#payment-buttons ) without having to write my own native…
tip
  • 53
  • 1
  • 5
5
votes
14 answers

Best way of protect a backing field from mistaken use in C#

I have a class (Foo) which lazy loads a property named (Bar). What is your preferred way to protect against mistaken use (due to intellisense or inexperienced staff) of the uninitialized backing field? I can think of 3 options: class Foo { …
Sam Saffron
  • 128,308
  • 78
  • 326
  • 506
5
votes
2 answers

Rails Newbie: Recommendations for error handling in controller

Sorry if the question is obvious, I am only starting to work with Rails. I have a following code in several controller methods now: respond_to do |format| if @project.save format.html { redirect_to(edit_project_url(@project), :notice =>…
4
votes
1 answer

Is there metrics & keylines for Android Wear 2.0 apps?

I'm looking for design guidelines for Android Wear 2.0 apps that contain metrics and keylines: standard margins, paddings, font/icon/button sizes and etc. Basically this but for watch apps. In official specification I can only find font sizes but…
eigenein
  • 2,083
  • 3
  • 25
  • 43
4
votes
3 answers

Abstract Class Design: Why not define public constructores?

Look here (Abstract Class Design): http://msdn.microsoft.com/en-us/library/ms229047.aspx It says: (1) Do not define public or protected internal (Protected Friend in Visual Basic) constructors in abstract types. In C#, we are not able to instantiate…
Mouhong Lin
  • 4,402
  • 4
  • 33
  • 48
4
votes
2 answers

When should I separately implement IEnumerator?

In the framework classes of collections I have often seen IEnumerator separately implemented as an inner class and an instance of it is returned in the GetEnumerator method. Now suppose I'm writing my own collection classes which will have an…
nawfal
  • 70,104
  • 56
  • 326
  • 368
4
votes
2 answers

How do you cope with additional complexity added by spring beans?

I am writing software for many years now and always tried to create expressive, clearly readable, maintainable, robust code. Recently I joined a team developing web apps using Spring managed objects. But I feel very uncomfortable with that…
3
votes
1 answer

How to distinguish unexpected (boneheaded) exceptions from expected (exogenous) ones?

In this post I use the categorization of exceptions by @Eric Lippert which you can find here: Vexing exceptions The most important ones in this case: Boneheaded exceptions are your own darn fault, you could have prevented them and therefore they…
Jonas Benz
  • 503
  • 3
  • 12
3
votes
0 answers

Swift API Design Guide - Initializer and factory methods calls

Swift API Design Guide says: The first argument to initializer and factory methods calls should not form a phrase starting with the base name Specially, it advises us against writing things like: let foreground = Color(havingRGBValuesRed: 32,…
GaétanZ
  • 4,870
  • 1
  • 23
  • 30
3
votes
0 answers

ConstraintLayout Guideline with scroll

I'm building a screen with ConstraintLayout , My screen need to have scroll since it's a long list a data. For normal screen i use Guideline and arranging the views based on percentage. How can i do a scrollable screen with Guideline ?
3
votes
2 answers

Guidelines for writing a test suite

What are the best practices/guidelines for writing test suite for C++ projects?
Aaron S
  • 5,023
  • 4
  • 29
  • 30
3
votes
1 answer

What are the Material Design Guidelines for ImageButtons?

What do the Material Design Guidelines say about ImageButtons (not toggle buttons)? I cannot find anything about them here: https://material.google.com/components/buttons.html. How should they look? When should they be used and when? How should…
Willi Mentzel
  • 27,862
  • 20
  • 113
  • 121
3
votes
1 answer

Should the padding and margin be 4dp or 8dp under the 48dp rhythm in Android design?

Recently I read the Design Guide on Metrics and Grids. It talks about a 48dp rythm which I should utilize in my layouts. But the Chapter "Mind Gap" confuses me. It states: Spacing between each UI element is 8dp. But in this graphic: And in the…
York
  • 503
  • 3
  • 23