Simple URL shortener
I started this project to learn more about Dropwizard and building web services.
Simple URL shortener
To better fit in with the Dropwizard "Resources" design methodology, the UrlShortenerResource class should be returning a "ShortenedUrl" object instead of a Response object.
Each time a URL is expanded, log as much data as possible (either to the DB or to a dedicated logging/messaging service).
Examples of data to log include:
This data could later be used to compute useful statistics/graphs on expansions.
"http://" protocol is currently hardcoded. This should be dynamic so that it could operate via https as well.
Should return the same shortened URL when given a previously seen long URL. Duplicate requests for a trending site might eat up lots of storage and can also affect query cache performance.
Like the Google button.
A Configuration property would be best. Don't try to intelligently guess hostname since we could be an internal application farm sitting behind external load balancers.
The UrlShortenerResource "redirectUrl" function now converts the stored String to a URI before sending the response. We should make sure that only valid URIs can be created in the DB by the user to report potential problems to the user at time of creation.
maven-shade-plugin has detected that some .class files
are present in two or more JARs. When this happens, only
one single version of the class is copied in the uberjar.
Usually this is not harmful and you can skeep these
warnings, otherwise try to manually exclude artifacts
based on mvn dependency:tree -Ddetail=true and the above
output
StdVectorBool suggested using Docker to encapsulate the database into the application.
It should be possible to disable a malicious URL or maybe any URL (DMCA claim, etc). However, the disabled URL state should be permanent to prevent:
Just a nice looking form and button for now.
We should review the Dropwizard core manual and create new issues as needed to take full advantage of the features that the framework has to offer.
Link shorteners can be used to obfuscate spam or phishing links. Google Safe Browsing API provides various APIs to check for malicious sites.
To better conform to the Dropwizard style guide, the project should be refactored to use the suggested package names.
To further shorten URLs, omit port # if it is the default - 80 for http or 443 for https.
Use Dropwizard Migrations to create database. This allows easy upgrades and rollbacks of the schema without requiring dropping all the data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.