In computer programming, boilerplate is the term used to describe sections of code that have to be included in many places with little or no alteration. It is more often used when referring to languages which are considered verbose, i.e. the programmer must write a lot of code to do minimal jobs.
Questions tagged [boilerplate]
524 questions
10
votes
3 answers
Spring form submission with minum boilerplate
I've been trying to figure out what the best practice is for form submission with spring and what the minimum boilerplate is to achieve that.
I think of the following as best practise traits
Validation enabled and form values preserved on…

Johan Sjöberg
- 47,929
- 21
- 130
- 148
10
votes
3 answers
Electron + Typescript + Webpack: Boilerplate Example
I don't know how to start the question, but the main problem is that I can't make the 3 technologies work together: Electron + Typescript + Webpack
I've encountered few boilerplates, but in them either the whole typescript is built with tsc (instead…

Mark Dolbyrev
- 1,887
- 1
- 17
- 24
10
votes
2 answers
Cordova + Angular 4 + Typescript boilerplate template
I'm working on a Web Progressive App using Angular 4.
This app needs to be wrapped up in an Apache Cordova as a Hybrid app built for Android and iOS platforms.
I'm looking for a working boilerplate template for Cordova + Angular 4.
Cordova is using…

NavCore
- 1,115
- 3
- 10
- 25
10
votes
4 answers
Can Java help me avoid boilerplate code in equals()?
I implement equals() the Java 7 way:
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
MyClass other = (MyClass) obj;
return…

Roger C S Wernersson
- 6,362
- 6
- 34
- 45
10
votes
5 answers
Is there a way to generate boilerplate code for RESTful stacks?
As I get more into RESTful APIs, the (good) simplicity of the approach means that you generate a LOT of boilerplate code, and code that has to match in three or four different places, e.g. for a Jersey-based stack:
HTML on the web page which…

Alex Feinman
- 5,393
- 1
- 30
- 48
9
votes
2 answers
Dealing with boilerplate in Haskell
This is kind of a soft question, but in the following code, there's a lot of duplication in the section marked "caesar ciphers." What's the "Haskell" way to deal with this? Should I make a higher order function? I thought about that, but I don't…

afkbowflexin
- 4,029
- 2
- 37
- 61
9
votes
5 answers
Which safety net do you use in Perl?
Which safety net do you use?
use warnings;
or
use strict;
I know that
A potential problem caught by use
strict; will cause your code to stop
immediately when it is encountered,
while use warnings; will merely give a
warning (like the…

Chankey Pathak
- 21,187
- 12
- 85
- 133
9
votes
1 answer
Trying to understand some HTML5Boilerplate items
In the HTML5Boilerplate, on line 72 to 80 in the css, it says:
/* fonts.css from the YUI Library: developer.yahoo.com/yui/
Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages
There are three custom edits:
* remove…

Kriem
- 8,666
- 16
- 72
- 120
9
votes
4 answers
Can I have Vim ignore a license block at the top of a file?
Is there a way to use folds or some other Vim-script black magic to hide license blocks at the top of files? I don't like that they take up such a large section of my editing pane; I like to get a sense for what a file is doing when I first open it,…

Steven Dee
- 273
- 2
- 7
9
votes
4 answers
How do I make rows in Zurb Foundation 4/5 full screen?
By default, rows in Zurb Foundation 4 and 5 run at a max width of 1000px, even on very large monitors, which creates margins on either side of the content. How do I make it run at full screen without affecting the responsiveness of the design?

Sinister Beard
- 3,570
- 12
- 59
- 95
8
votes
3 answers
Best way to handle loading, success and error in redux
Problem Summary
I am working on a project where we use a lot of API Requests and we expect that to scale even further with many new endpoints. The project is built using Redux and Hooks. We would like to separate the API requests from the components…

Bassem
- 3,582
- 2
- 24
- 47
8
votes
1 answer
HTML5 Boilerplate .htaccess vs httpd.conf
I'd like to start off by saying I am really new to working with apache, so please don't hold it against me.
The HTML5 Boilerplate comes with a .htaccess file, but I'm using django (on webfaction) and so I have a httpd.conf file for apache. Can I…

imns
- 4,996
- 11
- 57
- 80
8
votes
2 answers
Proper autogenerate of __str__() implementation also for sqlalchemy classes?
I would like to display / print my sqlalchemy classes nice and clean.
In Is there a way to auto generate a __str__() implementation in python?
the answer You can iterate instance attributes using vars, dir, ...:... helps in the case of simple…

user7468395
- 1,299
- 2
- 10
- 23
8
votes
3 answers
How to create a React App without Create-react-app
I'm a newbie with React, I have made a few apps using the create-react-app to help get me started(as followed by numerous tutorials). I heard that I now need to know how to create a react app from scratch without using the create-react-app…

tony2tones
- 1,422
- 1
- 18
- 19
8
votes
2 answers
Is an Extension Method the only way to add a function to an Enum?
I have a Direction Enum:
Public Enum Direction
Left
Right
Top
Bottom
End Enum
And Sometimes I need to get the inverse, so it seems nice to write:
SomeDirection.Inverse()
But I can't put a method on an enum! However, I can add an…

Camilo Martin
- 37,236
- 20
- 111
- 154