Comments (5)
Please, please, please, no JavaScript! JavaScript leads very quickly to unusable sites. I have disabled JavaScript for security reasons. But even with enabled JavaScript, most JavaScript sites do not work on browsers other than the browser of the developer.
from hackage-server.
I think what @amigalemming is saying is a good point, content archives should not stop working without JavaScript enabled. However, there's nothing wrong with implementing graceful degradation. Which is what Github does, for example.
from hackage-server.
So the reason to consider JS stuff is not because it's cool or slick, but because it could make the server side implementation simpler. The server already has to implement REST style PUT for resources, but the html pages cannot make use of this with html4 forms because they can only do POST using annoying form encodings. This means the server has both to support normal REST using normal representations and also POST using html form encodings. This is a pain, duplicates code and leads to tighter coupling of the presentation and data layers.
If we could use JS on the browser then we can use PUT and do sequences of operations, like any other REST client.
So this only helps if we don't have to also do the fallback to html4 forms & POST handlers.
from hackage-server.
The Hackage userbase is a peculiar one that likes to disable JavaScript a lot (I see this in the community often), so disregarding those needs for the sake of making dev work easier would obviously be insensitive. Though I'm interested to see why the model depends so much on the input method.
from hackage-server.
We could still do this for some of the admin parts of the site.
@chrisdone when you're using a more classic REST API style, setting some info may require a sequence of calls, e.g. POST to create some resource, PUT a couple extra optional attributes. But you cannot do that with a html UI using html4 forms. You need a POST handler matching just what the UI wants to set all in one go.
Here's a more concrete example: hackage has a users feature which has all the basics of user accounts, auth etc. then there's separate feature which manages some extra info about users (mostly for users corresponding to real people). Now a nice user admin UI will want to present all of this info and allow editing all of it together. That is, rather than a modular approach where there are separate pages and separate forms for setting basic and extended user info, a nicer UI will have one page/form to do all of it at once. The UI being less modular is ok, because a templating system makes that managable, but if it has to POST a single form result, then we still need a handler in there somewhere that takes the result, splits it up and sends the bits off to the various internal features. That's a pain. If the front end directly could do the small sequence of POST/PUTs requiresd, like any other REST client, then we don't need that special monolithic POST handler.
from hackage-server.
Related Issues (20)
- Downloads statistics is not working for several packages HOT 1
- Hackage accepts `.cabal` files with 2 `source-repository head` entries HOT 2
- Unique filenames for `$revision.cabal`. HOT 7
- "curl: (56) Failure when receiving data from the peer" when trying to upload HOT 7
- Hackage search showing package version inconsistency HOT 18
- Support two factor authentication HOT 2
- Cannot run shell script as a preprocessor HOT 2
- Allow uploading docs as tar.gz HOT 1
- downloads counts stored inefficiently.
- Support tar-0.6
- Replicating coverage report on user side HOT 2
- Use newer GHC version to compile? HOT 2
- Feature: Download link for revised packages
- Hackage rejects valid SPDX license bzip2-1.0.6 HOT 12
- quotes have very inaccessible / illegible styling
- new packages in inconsistent state HOT 2
- Docbuilder fails if package requests newer build-tool
- Broken documentation link HOT 1
- Actual login page instead of Basic Auth
- Only notify about dependencies that bumped to next major version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hackage-server.