开发者

Creating a dynamic one page web application [closed]

开发者 https://www.devze.com 2023-01-14 21:31 出处:网络
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
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 9 years ago.

Improve this question 开发者_运维知识库

I would like to make a web application (PHP) that will have overlay container that contain dynamic fields/forms.

I would like the user to complete the form but not be taken away from the main part of the page.

Imagine, browsing a website and reporting a page error into an overlay but not being taken away from the page you were reading.

Also, is it possible to make the form multiple parts/pages, such as user clicks next button and the next part of the form is presented?


Nice example of this type of web app here, with some useful tips:

  • The Future of Web Apps - Single Page Applications


What you are looking for is called ajax.

Using jQuery you could easily create the kind of form you want where the whole page is not reloaded upon submission.

Going into more details, check out jQuery UI. There a set of usually very simple to implement power tools to help create a dynamic webpage.

So jQuery UI stuff for layout (look at tabs) and ajax through jQuery for your communication with the server (PHP).


I just finished building a single-page application using the Yii Framework for PHP and Jquery (Jquery UI as well).

What I have learned is that Jquery isn't adequate enough to handle a true single-page application.

What you need to use is a library that handles a lot of issues that will come up whilst building SPA's and frees you from having to do a lot of DOM based manipulations.

Instead what you'd end up doing is actually write a true application and let the 'library' handle those aspects for you.

One library that comes to mind is AngularJS.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消