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 5 months ago.
Improve this question
When viewing iGoogle, each section is able to be drag-and-dropped to anywhere else on the page and then the state of the page is saved. I am curious on how this is done as I would like to provide this functionality as part of a proof of concept?
UPDATE
How do you make it so that the layout you changed to is saved for the next load? I am going to guess this is some sort of cookie?
Any up-to-date client side framework will give that kind of functionality.
jQuery
YUI
GWT
Prototype
Just to name a few...
Regarding the "saving" (persistency, if you will) of the data, this depends on the back-end of your site, but this is usually done via an asynchronous call to the server which saves the state to a DB (usually).
I hate to give a short answer on this, but there are several dozen different JavaScript libraries that provide this type of functionality, and lots of tutorials and howto guides available on google:
http://www.google.com/search?q=javascript+draggable
Some JavaScript libraries/frameworks you might want to take a look at:
jQuery
MooTools
Yahoo User Interface (YUI) library
It's amazingly simple with jQuery. Check out this blog entry on the subject.
Edit: I missed the "state of the page is saved" portion of the question when I answered. That portion will vary wildly based on how you structure your application. You need to store the state of the page somehow, and that will be user dependent. If you don't mind forcing the user to restore their preferences every time they clear their cookie cache, you could store state using a cookie.
I don't know how your application is structured so I can't make any further suggestions, but storing a cookie in jQuery is also amazingly simple. The first part of this blog entry tells you almost everything you need to know.
One method not mentioned here is that starting with ASP.NET in the 2.0 framework, Microsoft unveiled something called WebParts which enabled the building of controls which could be dragged and placed in the same way. This was supposed to be an easy method for users to create their own Web 2.0 style portals.
Related
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 7 years ago.
Improve this question
I'm a C# developer, and use XAML for user interfaces. Lately I've been wondering something regarding HTML5+JavaScript development (used in Universal Windows App development, as well as for websites). Javascript is compiled and executed at run-time on the client device. So any user can go into the folder where they're stored on computer, and see all the code in it, right?
There is no unreadable alternative for js and html5. That's why so many websites are so slow in adopting html5 video and replacing adobe flash.
But if your entire application is client side and you worry about your code being stolen you're doing something wrong. Almost any application requires serverside code that isn't accessible.
And it doesn't matter anyway, who cares about some js that makes a div draggable or moves some html around.
I dont think readable javascript code is of any value...what matters is the server side code like php or ASP which really matters in the security of the websites
And even if the developer didnt want the user to read the javascript framework.. what option does he/she have to prevent it..?none!
The client side code is indeed visible by the client. If something is available client side, then you won't need a round trip to the server to get it.
For example you could imagine a simple calculator application. You could write it client-side, in Javascript, the app can ouptut the calculations immediately. Or you could write it server-side (in wathever language you want), which means you need to ask the server for the calculation (with an ajax request probably), and wait for it to respond.
Also some things doesn't make sense on the server-side. Pretty much any action that changes the DOM, which only exists client-side, in the browser.
I wrote about this on my blog a while back, see Protecting Your Code,
as an addendum to my free ebook, Programming Windows Store Apps with HTML, CSS, and JavaScript, 2nd Edition.
The short of it is that JS code it not protected, though you can make things a little more difficult with minification/uglification like many website authors do. You can also take steps by putting some of the code you care about into Windows Runtime Components written in C++ (C# can be decompiled). The only really secure solution is to have code on a server, and draw from that in an app which of course doesn't work for all cases, but is an option.
Note that some of my comments in that blog from 3 years ago might be a little dated. I believe that current Windows Store policy now allows you to load code from a remote server at run time.
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
Never mind. I've found the correct answer
I think you have already all pieces in front of you, but don't know where to start.
I suggest that you
find an exciting Bootstrap blog template (like the free ones at Start Bootstrap)
understand the code, which is usually a good mixture of HTML5, CSS3, JavaScript with a modest use of jQuery
tweak it with your own ideas
if you have some special needs not covered by the template (for example collapsible menu items), you can browse the Bootply Snippet Library to look how others coded it.
Nowadays no web programmer starts from scratch. They choose a template with the basic structure of a one-pager, multi-pager, blog, e-commerce, etc. and start from there.
By the way: Alaboudi mentioned in his answer that you need to learn MySQL, too. This is indeed needed for dynamic content like e-commerce and blogs, but not for static content like business websites that don't change that often, but put an emphasis on individual page layouts.
But to get your first website up fast I would start with static websites and later extend your knowledge to MySQL.
Everything you have learnt is great, but you must also learn a database querying language (SQL). May I suggest you start learning MySQL, its very friendly for beginners. Now let me give you an example of how to code a dynamic website.
Lets consider facebook profile pages as an example. Firstly you must realize that there isnt 1 billion uniquely saved profile pages made for each user on the server. Rather, there is only 1 html css template that is filled in with appropriate information depending on the person loading the page. When the visitor comes to his profile page, his information must be queried from the database using a backend language (PHP in your case). Once the result of the call is retrieved, you fill in the appropriate information in your html (name, age, friends, blah, blah) and send it over to the user. So technically you are constructing the complete page with every call and you never actually have the complete page saved on the server.
Long story short, you should look into using a database.
This is not really a question. I would suggest you to go and code something.
You want to do a blog? Ok, try to do it with what you've learned so far.
When you'll start to build it, you'll have specific questions on specific problems, you can then search on Google your specific problem or come back to StackOverflow and ask for it.
Any resource is good and lucky you, there are plenty of resources on the internet ;)
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 8 years ago.
Improve this question
I want to make a poll for my website.The poll I want should look like the poll on http://www.premierleague.com/en-gb.html.I am not sure if I should use PHP,Javascript or etc to make a poll.Can anyone help me in this? Thanks...
You're going to need to create a form and receive the data on the server side using PHP. Then you're going to put that information into a database.
I hope I do not come across as too mean but, the decision on which language to use is pretty simple when compared to actually coding it. I'm betting you are not entirely experienced with web-based programming languages. I would strongly suggest you look for some pre-made scripts in the interim:
Here is a simple tutorial on creating polls: http://code.tutsplus.com/articles/creating-a-web-poll-with-php--net-14257
If you are OK with the idea of using a CMS, Here is a WordPress Plugin that should do the trick: http://code.tutsplus.com/articles/creating-a-web-poll-with-php--net-14257
Otherwise, it's important to understand the flow of data:
Display the poll to the end user (use HTML forms and CSS to style)
Client submits data (either built in submit functionality or Ajax)
Server Receives data and stores it into database (php)
Page is re-loaded and results are displayed (read with php, then displayed using html/css)
In other words, you are going to use many of the available languages and tools to create a polling script.
Start with a pre-built one and look up other resources to learn to make/customize your own.
If you need to save poll values, than PHP/MySql + JS for live effects, animations + CSS for styling.
Create database tables.
Create HTML form.
Style form to fit your needs (maybe jQuery UI).
Use Ajax to submit form.
Use PHP to gather information form user, validate it and save to database.
Reload user poll view to see changes.
Sell this masterpiece to Google/MS/Apple (or any other company).
Take big cup of hot chocolate.
Rule rest of the world.
Good luck.
Yes, you can use PHP or any server side scripting for validating, storing, processing poll, and use HTML/CSS/JS for client side, this is the main whole web page. You should also have DBMS (Database Management System) like mySQL, msSQL, etc., for storing poll answers.
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 8 years ago.
Improve this question
I am building an online store in ASP.NET Web Forms 4.0 and i would like to add a feature to it. I would like to add some user reviews(commentaries) to my products and some ratings scores.
Can someone help me on how should i implement these things ?
Is there on the internet any downlodable content(I didn't find
any) ?
Can you provide me some useful links on how should I implement
this ?
Any advice or tips and tricks ?
Ratings scores require javascript ?
Can someone help me on how should i implement these things ?
You can use jQuery, ASP.NET, SQL Databases mixed up with each other to create this system.
You will require HTML to create the stars, and then jQuery to handle the events (click dblclick etc) and sent the Ajax requests to the server.
ASP.NET would handle them all and save them or what so ever.
SQL Database would be required to save the data if required. This is the basic of this system to save and get the ratings by the user. You can use third-party plugins too. But creating one of your own would be the best option.
Is there on the internet any downlodable content(I didn't find any) ?
Internet is used by downloading Stuff, you even downloaded this page on to your browser. You didn't find any, or you didn't bother searching for it thoroughly? I bet you would have found good stuff.
Can you provide me some useful links on how should I implement this ?
I think this is the question that you are wrapping inside other text.
Here is a good tutorial from Mike Brind, that you might love too. http://www.mikesdotnetting.com/Article/114/jQuery-Star-Rating-with-ASP.NET-MVC
He is using ASP.NET MVC to let the user post the rating on his system. Posting a part of his code won't be good here. You need to use it all. Go there and learn it you will understand, he's a good teacher. Trust me.
Any advice or tips and tricks ?
Keep working out! You'll figure out the tricks and tips as you move. Until then, all that I can tell you is to learn the API and keep using and learning it through proper usage of them in your applications.
Ratings scores require javascript ?
Only if you want to do some dynamic stuff. For example if you want to store the rating synchronously like ajax request etc. If you want to change the content or the color of the rating stars etc. Then you require JavaScript.
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
With the current state of html5/css3/javascript and the browsers support of it, do you think it is possible to create a fully functional word-processor (or document editor) like Microsoft Word or LibreOffice Writer with > 80% of its features? I'm talking about the rendering and editing engine, I think a server-side component for loading and saving documents to disk is always required because of security, conversion, etc.
Of course I am not talking about HTML-editors which are commonly available (e.g. CKEditor, TinyMCE, etc.) but I compare it with products like DevExpress DXRichEdit, Telerik RichTextBox and TX Text Control. Why would you at this moment still need technologies like Silverlight, ActiveX or Flash to create a webbased word-processor?
There are some initiatives regarding HTML5 document viewers, but besides Google Docs and Zoho Docs (which are limited in features compared to desktop based word-processors, and operate more like advanced HMTL editors) there is little available in regards to webbased word-processors.
Is there a reason there is no HTML5 word-processor yet? What do you think is still missing from the current technology to be able to create a webbased word-processor suitable as replacement for products like MS Word?
No if you think anything more advanced than a letter to your aunt.
HTML WYSIWYG components are horrible mess (contentEditable). You might almost success for one browser, but xplatform stuff (IE) just wont fly.
Google Docs is the best what money can buy today and it is flakey at the best.
However Silverlight or Adobe do not offer anything better.
The best bet is to hope that HTML5 APIs got to the point pure Javascript editor is possible. But they are not yet there.
ConstEdit at http://www.constedit.com may be such a word processor that satisfies your requirements on html5/css3, but not javascript.
It generates documents in the html format. Html5 sectioning elements tags are fully supported. There is an option to generate css stylesheets. It is not web-based. It runs locally on your pc.
You may give it a try. It is free for non-commercial users.
(Please note that I am the author of this software)
I am very interested in this issue, too. I want to be able to take templates and finalize my cover letters and similar format-critical documents via an online word processor.
I detest CKeditor and the other html editors. They are definitely not WYSIWYG.
The best one I've found so far is www.TeamLab.com I have no affiliation with them at all. I think they already recognize the monetary value of their online word processor. They are not giving out their API's and last time I spoke with them they said they will not do so for a number of months - presumably to assess how they want to charge for this valuable WP feature.
I am an attorney who needs to have proper looking letters and documents. I have my own online application, and the online word-processing feature is only one small - but very important - aspect that I want to add to my app for my staff attorneys to have.
I may be wrong but ConstEdit seemed to be just preliminary. If I am wrong, I would very much like to talk to you. I can give you good advice from a User's perspective.
Another group that I think is working on this concept is www.TheFormTool.com They indicated they have a secret project, and I suspect it is this very html5 word processor.
As a user it is my opinion that such a product would be very valuable. I encourage people to pursue this.
Only reliable way to find out is to attempt it yourself, and see if you're blocked by something missing in the tech stack you're using (in this case js/html5/css).