Well known names are part my rapid application development (xRAD) frame work. In this blog post I introduce a well known name that has helped me, since 1992, to rapidly develop applications for my clients.
In 1992 I decided PostalCode would be the well known name I would use for: postal code, post code,and zip code.
Zip code, post code, and postal code are different names for the same thing - a code that is appended to the end of addresses to make it possible to quickly sort mail.
PostalCode is consistently used in my databases, models, code, generators, snippets, control names – anywhere one of my applications uses a zip code, post code, or postal code.
Stay tuned for my next XRAD blog post in which I will explain how a well known name like PostalCode contributes to rapid application development.
In my two previous vRAD posts I explained the concept of well known names and introduced ‘PostalCode’, a well known name I have used for application development since 1992.
At the end of my last xRAD post I asked: Can you think of at least three more ways the well known word PostalCode helps us build applications rapidly?
Here are a few of many correct answers:
In three posts I have explained the concept of well known names and how a single well known name can speed up application development by promoting re use over new development.
Since 1992 we have developed 1513 well known names. Examples are: PhoneNumber, EmailAddress, City, State, Country, Customer, FirstName, LastName, Contact, Url, Product, UnitOfMeasure.
Our well known names are used in schema scripts for databases, in models, in code, generators, in documentation, and much more. We have code snippets for every well known name.
When we start a new project an average of 88% of the names we need come from our well known names.
In future posts I will explain how the ‘well known’ concept applies to other things used for application development; things like ‘well known tables’, well known methods, well known constants, and more.
In my three previous xRad posts I explained the use of well known names and how they help make extra rapid application development (xRad) possible.
In this post I will expand on the ‘well known’ concept that speeds up application development by discussing well known table schemas.
There are many database tables that are commonly used in business applications. A few examples are:
Since 1992 we have identified 1104 well known table schemas.
Like well known names, well known table schemas are used in my databases, models, code, generators, and snippets.
And, like well known names, well known schemas reduce development time because they are reusable.
Some benefits of well known table schemas are:
1. When a new project starts up no design time is spent on the well known tables.
2. Programmer documentation about well known schemas has not changed since 2011. We will add more well known tables schemas but they will be additions, not changes.
3. We run one script to install all well known tables at the beginning of a project.
4. Code, text, comment, and documentation generators - auto create data access code, enum code, validation code, classes, and more for the well known tables. Once we install the tables and run the generators everything just works.
We’ve found it’s easier to install the well known tables and generate supporting code than to pick and choose.
This post explains several ways well known names help my company build applications rapidly.
In my previous vRAD post I introduced ‘PostalCode’, a well known name I have used for application development since 1992.
In our development world, the well known word PostalCode is used where ever a zip code, post code, or postal code is represented or stored, for example:
1. as the column name of all database table columns that store a zip code, post code, or postal code 2. in data models where ever a zip code, post code, or postal code is used 3. as the property name in all classes that require a zip code, post code, or postal code 4. in programmer documentation 5. in code and other generators
1. as the column name of all database table columns that store a zip code, post code, or postal code
2. in data models where ever a zip code, post code, or postal code is used
3. as the property name in all classes that require a zip code, post code, or postal code
4. in programmer documentation
5. in code and other generators
PostalCode helps build applications rapidly because it reduces development and development project time.
How? Reuse. Reuse as in where the same thing is used again for the same function – again, and again, and again. Since 1992:
1. No design time has been spent coming up with what to name things that will represent or store zip codes, post codes, or postal codes.
2. Programmer documentation about PostalCode has not been changed since 1992.
3. Anyone who has worked for me for more than a couple of months can teach a new person to use PostalCode because it is – you guessed it – well known.
4. Code generators, which require postal codes, post codes, or zip codes - for schemas, models, code, and tests – used the well known name PostalCode. We never spend time modifying that part of our code generators.
Can you think of at least three more ways the well known word PostalCode helps us build applications rapidly?
Answers will be published in the next xRad blog post..
Below are some features that may be a part of C#.6 and VB.12. For current information visit Language feature implementation status for Dev14
Feature status as of 10/3/2014:
Feature
Example
C#
VB
Primary constructors
class Point(int x, int y) { … }
No
Auto-property initializers
public int X { get; set; } = x;
Done
Exists
Getter-only auto-properties
public int Y { get; } = y;
Ctor assignment to getter-only autoprops
Y = 15
Parameterless struct ctors
Structure S : Sub New() : End Sub : End Structure
Using static members
using System.Console; … Write(4);
Dictionary initializer
new JObject { ["x"] = 3, ["y"] = 7 }
Indexed member initializer
new JObject { $x = 3, $y = 7 }
Indexed member access
c.$name = c.$first + " " + c.$last;
Declaration expressions
int.TryParse(s, out var x);
Await in catch/finally
try … catch { await … } finally { await … }
Maybe
Exception filters
catch(E e) if (e.Count > 5) { … }
Typecase
Select Case o : Case s As String : …
Guarded cases
Select Case i : Case Is > 0 When i Mod 2 = 0
Partial modules
Partial Module M1
N/A
Partial interfaces
Partial Interface I1
Multiline string literals
"HelloWorld"
Year-first date literals
Dim d = #2014-04-03#
Binary literals
0b00000100
Digit separators
0xEF_FF_00_A0
Line continuation comments
Dim addrs = From c in Customers ' comment
TypeOf IsNot
If TypeOf x IsNot Customer Then …
Expression-bodied members
public double Dist => Sqrt(X * X + Y * Y);
Event initializers
new Customer { Notify += MyHandler };
Null propagation
customer?.Orders?[5]?.$price
Planned
Semicolon operator
(var x = Foo(); Write(x); x * x)
Private protected
private protected string GetId() { … }
Params IEnumerable
int Avg(params IEnumerable numbers) { … }
Constructor Inference
new Tuple(3, "three", true);
String interpolation
"\{p.First} \{p.Last} is \{p.Age} years old."
TryCast for nullable
Dim x = TryCast(u, Integer?)
Delegate combination with +
d1 += d2
Implicit implementation
Class C : Implicitly Implements I
nameof operator
string s = nameof(Console.Write);
Strict modules
Strict Module M
Faster CInt
Dim x = CInt(Math.Truncate(d)) |
#pragma
#Disable Warning BC40008
Checked and Unchecked blocks
Checked : x += 1 : End Checked
Field targets on autoprops
Serializable> Property p As Integer
If(b,e1,e2) uses type context
Dim x As Integer? = If(b,1,Nothing)
It looks like a function but it is an operator. The Visual Basic If operator provides the functionality of the IIF function and more - including short-circuiting. It can be use as a ternary operator which mimics the functionality of the IIF function while adding some more to it, and as a binary operator which provides a comparison/assignment feature.
The operator uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments.
When If is called by using three arguments, the first argument must evaluate to a value that can be cast as a Boolean. That Boolean value will determine which of the other two arguments is evaluated and returned.
' This statement prints TruePart, because the first argument is true. Console.WriteLine(If(True, "TruePart", "FalsePart")) ' This statement prints FalsePart, because the first argument is false. Console.WriteLine(If(False, "TruePart", "FalsePart")) Dim number = 3 ' With number set to 3, this statement prints Positive. Console.WriteLine(If(number >= 0, "Positive", "Negative")) number = -1 ' With number set to -1, this statement prints Negative. Console.WriteLine(If(number >= 0, "Positive", "Negative"))
Scaffolding
With this update, scaffolding will correctly detect what are the versions of NuGet packages that the project is using. For example, if the project is still using ASP.NET MVC 5.1.2, then scaffolding will use 5.1.2, instead of 5.2.
JSON Editor
Auto formatting is now part of the JSON editor and is turned on by default.
Brace and brackets match highlighting are just like in C# and JavaScript editors now.
Supports more selector patterns
Drag and Drop Magic
Added drag-and-drop of fonts, images and.css files from solution explorer into .css files.
Added support for two-factor authentication in One ASP.NET templates for MVC and Web Forms.
There's more...