When does a web app need a Gmail-style loading page? [closed] - language-agnostic

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
When does a single page web app need a loading page in the style of Gmail or RTM or the many others? Should there be a size at which I introduce one? Is it just about time?
And, is it just loading in the JS, CSS files etc, or is it doing processing too?
Also, as an aside, how would I even go about introducing such a page? Are there plugins/guides, etc?
Thanks!

It is a complex question. as many times the best answer is "it depends".
I think it is not about size but simply about how user experience you want to offer. More richest and dynamic content more rich your client must be.
So if you make many things dynamically using JS at client side, like gmail,where UI never freeze, the calls are asynchonous and content refresh is made by JS, you can arrive to have an architecture where server offers an API and client side contains more business logic.
The basic idea is to have a HTML file, with some CSS and JS code responsible to load or send data from/to server and update the UI.
This is different from the "traditional" model whre client request a server page. The server proces the request, generates a HTML (plus CSS+ JS) and returns to client. Then any click on a button generates a new request that returns a new page. etc.
I suggest you to take a look to Dojo toolkit.
Programming in the gmail way can produce lost of JS files and really big HTML files. Dojo simplifies that a lot and also manages modules. This way the client side code is not loaded once when the HTML page is loaded, but it manages which "modules" you need and load it when needed.
Hope this can clarify a bit.

Related

Web app for drag and drop, save as PDF and print [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I've been tasked to make a web app that users can drag and drop images to a container, depending on the size of the image, it needs to be able to snap in to place until the container is full.
I'm only a beginner programmer, I'm not too sure how to even begin (I've been "googling" for the last couple of days). I'm only going to host the app on a local server.
Can someone point me in the right direction?
Would Python be the best bet here?
Is a Web App even a good approach to this? I'm only going with a web app, so users can access through localhost.
There's no data stored (yet). Just saving as pdf and printing.
I'm not sure what other features will be added in the future, but would be good to have future proofing.
Thank you in advance!
Dispite of my comment I'll give you some directions...
I'll upset a bunch of people, but I don't think python and web are a good match...
You should study a client-side framework like react, that has NPM modules to easily drag and drop, and to organize children in containers in smart ways.
The PDF part is tricky, theres a thing call ghostscript that can "printscreen" a html rendered page and make pdfs, or some tool that do the same using a headless browser.
Can be done, but won't be trivial...

How to upload a website without an html files [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
H!
I have created a website, where all the files are of the type CSS, js, pug, and when I want to publish the site, I need to give an index.html file from which the site will start. The problem is that I do not have such a file.
Does anyone know how to deal with such a problem?
And in addition, I started the site by running it in localhost: 3000 does anyone know how to start it now so that it will work when I upload it.
Thanks in advance to all the helpers.
Your mention of localhost:3000 implies that you have written a website which depends on Node.js for server-side code (at a minimum this will involve the translation of your Pug templates into HTML on demand).
There are two general approaches you can take to solve this problem:
Find hosting which supports your server-side code and deploy your Node.js application to it. (This will not be typical static or shared hosting).
Generate static HTML documents from your application and upload those HTML documents. (The specifics will depend on exactly what your server-side implementation does and will probably be a significant amount of work. Typically if you wanted to take this approach, you would have used a framework designed to output static sites from the outset).
Obviously if you have your server-side code processing user input (such as form submissions) option 2 will not work.

building html resume... should I use JSON? PHP includes? sql? xml? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I am building an html resume (with bootstrap tabs) but want to break the sections into separate parts for easy editing and repurposing.
For example, have the work experience data in one file, have education in another and link them to a tabbed html page, but also have the option to export to a docx or pdf. Have skills appear on the html version but not on the pdf export.
What would be the best architecture design to use? Would JSON be good or should I use PHP includes.
What about xml? or should I just maek it a mysql database and use PHP to pull that data (this seems like overkill for less than 1,000 words).
I would argue any of these will be an overkill for a small project. So I'd go placing it all in one html file.
If you want to automatically generate pdf or docs it's no more a html resume. So I won't answer generating part of the question.
As for html management you can use templating language, e.g. Nunjucks or Pug
It will allow you to include html files one in another; the downside is you'll have to setup a build tool like Gulp for this (which will require some basic Javascript knowledge and time).
Something which you need to consider is the format which you would be handing into potential employers.
If you are hoping to hand in a web page, you would probably want to "render" it and not hand in a piece of functioning code. The reason for this, is if the employer/recruiter is unable to open or correctly read the file, this will decrease your chances of getting the job dramatically. Not to mention many large companies use bots which read CV's for you, See this article which explains that matter all to you.
You would also want to consider what some companies/recruiters may think when they see CV.html in their email inbox. Some will think its a really smart and creative idea, others may think it is an incompatible file with their computer and may never open it. Leaving instructions on how to open the document may take time which the employer doesn't have.
I'm not saying its a ludicrous idea, I'm saying you need to properly plan it out. Personally, I would keep an online copy on my website, but I would also have an additional copy (Word document or PDF) which could be downloaded and accessed by those bots which I mentioned early.
In programming there are many ways to do the same thing, and it is entirely up to you and your abilities to find what is best.

C++ Windows Sockets: Downloading an html file [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Given:
Suppose that I have a website called "exampledomain.com", and that on that website, I have one file called "my_doc.html", the full URL address of which is "https://www.exampledomain.com/my_directory/my_doc.html". (Not my actual website; this is just hypothetical).
Objecive:
I'm trying to develop a Client-Side Application, using C++ & Windows Sockets, that downloads my HTML file, parses it, extracts some specific information, runs some calculations, and displays its results to the user.
Question:
How do I download the HTML file from the server to the directory "C:/ExampleDirectory/" on the client-side computer, using the Windows Sockets Library?*
Clarification:
I want to write this Client-side program to work with the existing website. IE: I want it to download the file in the same way that an Internet-Browser like Microsoft Edge would.
Edit:
Just to clarify, the server uses a secure, account-based system, and thus the document would be transferred using HTTPS. I'm not really sure if this would effect the solution, but I thought it'd be worth mentioning.
Don't.
A socket library is not an appropriate tool to talk with a web-server. http is complex enough that you want to use a specialized http library. There are several such libraries available. curllib springs to mind. And of course there is the WinHttp tag https://stackoverflow.com/tags/winhttp/info.
And for the html part, you'd want to use an html parsing library to extract the desired info.

FileMaker + Ruby + HTML + eBay: Any way to upload listings as HTML? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I work for a small business that does a lot of commerce via eBay. Right now, we have a pretty large database (in FileMaker), and our current method for getting newly-entered items from the database to eBay involves entering them manually, line-by-line, through a browser window into Auctiva. This is an extremely time-consuming process, and I've been tasked with automating it, if possible I've already written a good bit of code in Ruby to parse tab-delimited FileMaker exports into pretty much whatever I want, so I was wondering if there was some way to upload static HTML directly into an eBay listing. If so, I could just snag a spiffy HTML template from oswd, modify it, and modify the code I've already written to handle injecting the pertinent info directly into the document, then just upload that.
If you can do whatever with the product data, and have all the data necessary to make a listing, you can use the eBay API.
http://developer.ebay.com/products/trading/
has a HTTP POST based submission handler so you can use any http client you want (Net::HTTP, HTTP party, Curb etc) and post your listings that way.