Modern web application should be user friendly and notify the User when time consuming operation is on the way, e.g. uploading file or downloading data.
There are a some solutions for AngularJS which are fairy easy to integrate.
First one is Angular Loading Bar. It can be attached to your application with almost zero configuration and does not affect application design.
It attaches the interceptor to $http service and displays a thin progressbar on the top edge of the page.
Demo
Another component is angular-busy. It is more customizable and can show a spinner with backdrop above any page element. Just wrap it with <div cg-busy="..."/>.
But it may require some customization.
Demo
Also, there are some examples how to add loading indicator to ui-router.
Stay DRY! Don’t waste your time implementing tags input control for AngularJS yourself! There is an excellent AngularJS module for that called “ngTagsInput”. It’s also supports autocomptetion, validations,custom styles and templates. See the demos.
It took me just 10 minutes to add that type of control to my application.
Include script and CSS to your html page. If you’re using some dependency injection pre-processor like gulp-inject or gulp-ng-inject you don’t need it.
Pretty simple, isn’t it?
The only thing to consider is handling of the tags model. $scope.tags will be an array of objects on the form {text:value}. You may need to transfer them to array of strings:
var tagValues = $scope.tags.map(function(input) {return input.text;});
User authentication is an important part of the web service API design.
One of the common approach is the Hash-based Message Authentication Code – HMAC.
Used together with transport level security it provides reliable mechanizm of user authentication and message integrity validation.
OWASP Development Guide – The OWASP Developer Guide 2014 is a dramatic re-write of one of OWASP’s first and most downloaded projects. The focus moves from countermeasures and weaknesses to secure software engineering. The Developer Guide 2014 is a “first principles” book - it’s not specific to any one language or framework, as they all borrow ideas and syntax from each other. There are highly specific issues in different languages, such as PHP configuration settings or Spring MVC issues, but we need to look past these differences and apply the basic tenets of secure system engineering to application security.
OWASP Enterprise Security API / ESAPI 2.x on GitHub – ESAPI (The OWASP Enterprise Security API) is a free, open source, web application security control library that makes it easier for programmers to write lower-risk applications. The ESAPI libraries are designed to make it easier for programmers to retrofit security into existing applications. The ESAPI libraries also serve as a solid foundation for new development.
CVE – CVE is a dictionary of publicly known information security vulnerabilities and exposures.
National Vulnerability Database – NVD includes databases of security checklists, security related software flaws, misconfigurations, product names, and impact metrics.
Spring Boot is an excellent tool to bootstrap java application.
Most of the references mention how to create a standalone java application, optionally with embedded web server (tomcat or jetty). But Spring Boot supports also creating web applications intended to run within servlet container.
I want to share my media library between these two computers and keep them synchronized. When I add new file on one computer, it should apear on another. When I delete a file on second computer - it should be deleted pn first. When I change iTunes playlists on one computer it should be changed on another.
I don’t want to keep my media on Network storage (NAS) or External drive (USB), because it will be impossible to listen to the music on the go, when NAS or external drive is disconnected (e.g. in cafe).
To be able to use the same iTunes media library database on two computers I need to make my media files available by at the same path on disk. Normally, media files are under the user account folder. But it is possible to move them to the location common for all user accounts.
Next, I need to keep iTunes media file in sync.
After some research in the Internet I come to following solution.
Backup tour iTunes media folder /Users/user/Music/iTunes
Move iTunes media files to the /Users/Shared/iTunes Media folder.
Set new media files location:Then run File > Library > Organize Library and select “Consolidate Files” to copy your files to new location.
Remove your old Original files were copied, not moved. You need to remove them (if you have made a backup on step 1):
rm -rf /Users/user/Music/iTunes/iTunes\ Media
Close iTunes and copy your /Users/user1/Music/iTunes to /Users/user2/Music/iTunes on second compuler
Copy /Users/Shared/iTunes Media from first to second computer to the same location.
Setup media folder synchronization between two computers using BitTorrent Sync. If you have smaller media library that fits into DropBox – then go for it. It is possible to use any cloud solution, e.g. at the moment (February 2015) Yandex Disk offers 10GB for free.
Wait for synchronization complete.
You may start using iTunes on both computers. Keep in mind, that if you modify your media library from both computers simultaneously, you will have only recent changes. You may want to setup one-way synchronization: one computer will be the Master where you will manage your library and the second one is for listening only.
If you are involved in software development then recalling a basic testing principles once again is not a waste of time. So here are the principles:
A necessary part of a test case is a definition of the expected output or result.
A programmer should avoid attempting to test his or her own program.
A programming organization should not test its own programs.
Any testing process should include a thorough inspection of the results of each test.
Test cases must be written for input conditions that are invalid and unexpected, as well as for those that are valid and expected.
Examining a program to see if it does not do what it is supposed to do is only half the battle; the other half is seeing whether the program does what it is not supposed to do.
Avoid throwaway test cases unless the program is truly a throwaway program.
Do not plan a testing effort under the tacit assumption that no errors will be found.
The probability of the existence of more errors in a section of a program is proportional to the number of errors already found in that section.
Testing is an extremely creative and intellectually challenging task.
I recommend reading a book “The Art of Software Testing” by Glenford j. Myers, Tom Badgett and Corey Sandler (ISBN: 978-1-118-03196-4).
You most likely used Base64 encoding. It’s about encoding any sequence of data as a printable string (digits, lower case and upper case letters). But Base64 has variations. E.g., not every Base64 variant allows safe transfer of any data as URL parameters.
For that purpose there is a special dialect of Base64: Url-safe encoding.