I learning web dev and I have to make a simple website constructor - user logs in, fills several forms, shoose design template and then get page on my domain, something like website-constructor.com/user-generated-page/ - according to his/her settings.
The question is - what frameworks I'd better choose for this job? User part I'll do ok with javascript, but what is better for server part - generating a page? Maybe there are some special tools for such website?
Cheers, thanks a lot!
Welcome to StackOverflow. Sure your question is off-topic, but you can try wordpress. It will give you everything you need for constructing a simple website. It generates pages and much more. Check it out!
Related
sorry if this has been asked too much but no question seemed to fit my situation.
I'm working on my website.
It's just HTML/CSS/JS (so no wordpress or anything like that)
It pretty much has only 4 pages (Home, Apply, Privacy-Policy, and Terms)
I made the website in English, but I also want to have it in Romanian.
I believe having 2 folders for each language would be the best way:
site.com/en
site.com/ro
But what I would like is if people from Romania would automatically get sent to /ro and the rest of the world to /en
I don't plan on doing many updates to the site as soon as it's finished, so I'm thinking using something like i18n might not be necessary (not even sure what that is), but I'm thinking if I use js to generate content it might slow down the loading speed so I'd only use js or php or whatever in order to automatically send users to the preferred language.
How could I do that, and what would actually be the best way to serve a simple, static, pure code website in two languages?
Thanks :)
With navigator.language you can get the browser language. I would prefer that setting rather than going via location.
Say you're Romanian but on holiday in Germany, you would still get the romanian version of the site.
You could set the english version as default and then use javascript to redirect to your romanian version if you detect romanian language code.
I have created a website for a third party, who have no experience in editing HTML. However, the third party wishes to be able to edit the content on the website without having to open the files and edit it this way, they wish to do it somewhat WYSIWYG (For example, hit an "edit" button for the content they wish to edit). Is this possible to achieve? It is not an internal website, it has user tracking (this should obviously only be available to admin users).
Is there a way of making contents of a div editable, then saving the change directly to the server, so the content gets updated publicly?
I am currently researching the topic, and although I have found some indications that the solution may be a PHP script, I have yet to find any definitive solutions or examples of similar functionality.
Yes you will need a backend language or framework to archive this. Where Javascript is used to interact with the page, the actual storage of information requires a database or similar technology.
Unfortunately which backend language or framework to choose really is the million dollar question. It largely depends on exactly what you are trying to accomplish, what your client or user is comfortable with, and how much experience you have programming.
PHP is fast and time tested backend language. Node is the new kid on the block, and it very popular also. Java and dotNet are on the way out. You can dig up a bunch more including Go, Python, Haskel, Etc.
You can use a languge listed above and start scripting away, but this can be time consuming and error prone. Most people use a framework to get started, and program using that framework's tools. The most popular PHP framework is WordPress, but it is designed for blogs and might not fit your use case. I use the framework Craft CMS which is very customizable. But the way you are phrasing the question a framework might be overkill. This is really up to you to decide after doing research into the available options and comparing them to what you wish to accomplish.
For the WYSIWYG, you might want to look into the following tools for the client to edit content:
https://imperavi.com/redactor/
https://ckeditor.com/
Hopefully this provides some direction, happy coding!
I'm a beginner at coding, I know javascript but not super advanced objectd,
I'd like to know how to change html content with its URL. For example,I am on a website like GMAIL, it has different page of registring and logging in. These two pages have different URLs.
What I'd like to know is how do they change the URL along with HTML when I click on the button "Log in". Is this possible through server-side like node.js and express, or just with front-end javascript?
One last thing, do websites have multiple web pages or it's just in one single HTML file?
Well, I have set up a practice project, but I don't know what I am doing.
I changed HTML content with jQuery library but I don't know how to change URL.
First I made a homepage with some text and two links to two forms.
I showed registration form when click on "Sign in", and log in form on "Log in", and hid the homepage with the show() and hide(). The URL doesn't change in order to work with it with express. I tried it with history.pushState() but it messed up things: I can't return to homepage, and it didn't change the URL i wanted based on the form. So i deleted it, and I am stuck and don't know I could find some tutorials online.
My code doesn't contain anything other than what I described.
So, please can you explain to me how websites do that.
And one other thing, my express server now is very slow, it takes nearly 5min to start. I don't know if it's because my pc which is old and not super good unfortunately.
Can you please advice me with some tutorials and tips?
I agree that your question is too broad. Even there is many years invested in unversity to know these stuff well, I believe in self learning, so I will give you some light for your next steps in this world.
Here are some questions you may ask Google or research where ever you want:
There's both applications that hosts entire html documents in a server and reacts to http requirements responding with different ones. These are the first ones in existence.
Today the trend is to host information on distributed servers (Even cloud) as services to interact with just as information repositories, and entire client side applications that handles that information to show to the user in a more interaction friendly way.
So here are 4 first questions you can ask:
How does HTTP protocol works (with html documents e.g.)?
What's the difference between thin client and fat client applications?
What are web services?
How can I do a simple client side application with different routes using a public web service?
There is a lot of information to read about, and that's not the way I learned in university, so I can not tell you that's the right way or even a good one. Anyway, you should consider taking a web programmer beginner course, if you already know about basic algorithmic composition.
Wish you the best in this extensive path...
I'm sure I am running the risk of being told off for being off topic or too vague with this question but after a great deal of research I really don't know where else to start other than the knowledgeable folks on SO.
Here is the general gist of what I want to do:
I have some web software I want to make available to my clients the easiest way possible. From what I have read and understand SaaS is the best option for this. I want to enable customers to sign up, and then copy and paste a segment of code into their site and that is the set up complete. Take this piece of code for example:
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"myscript.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
This is code from another site. But from what I understand it asychronously creates script tags and calls an external javascript file from a CDN and appends this to the users web page?
So, if I am right the user will now have a pointer to a javascript file hosted on a CDN. In this file I want to dynamically generate HTML content specific to the user and then append it to the webpage they are viewing. Say this HTML is a form which submits to a database on the CDN via AJAX.
So this is what I want to do. But it is all new to me. I am not even sure if it possible, and whether SaaS using a CDN is the right approach? If anyone could point me to some tutorials or articles about how to set something like this up it would be great. I have done a great deal of research but am finding it to a bit of a minefield of information. It is difficult to know where to start.
Sorry for such a vague question. I will edit and refine as I receive answers to try and clarify things and hopefully help out some other people.
Thanks for your time.
Perhaps look at Google Tag Manager, as a way to inject tags into your content.
Are there any best practices for implementing a long-lived JavaScript app, i.e. a web app that consists of a single page and loads other pages into the content area via AJAX? (Gmail is a good example of this.)
I already read about pro and cons, SEO, performance, etc. (http://stackoverflow.com/questions/1499129/one-page-only-javascript-applications), I'm interested in patterns how to implement this.
I'd like to avoid large frameworks (e.g. Cappuccino, Echo2, SproutCore, Claypool).
How would I manage dynamically loading content while maintaining the #link portion of the URL (for bookmarking)?
Don't get me wrong, I have an idea how to implement this myself, but this problem must have been solved before.
Are there articles on this? Maybe a tiny JavaScript library?
Thanks!
Mark
I found JQuery Address http://www.asual.com/jquery/address/ extremely easy to set up. $.address.change() let's you know whenever something was clicked (works with back and forth as well) and you just parse self.location.hash and build your app from there. It seems lighweight enough as well, if you can handle using JQuery.
Here is an article to help you with the History bookmarks problem: http://codinginparadise.org/weblog/2005/09/ajax-dhtmlhistory-and-historystorage.html. It's quite old, but the solution still works.
I made several apps using this "long lived" apps, and one thing you should take into account is IE's tendency to leak memory.
I would also recommend you to use a JS library, like JQuery to help you with the AJAX and DHTML.
Heard about javascript pushstate?
http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate
It's meant to replace location.hash