473,386 Members | 1,796 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sorting logic in web app's offline state?

Hi.

We are in process of making a web project, where, one of my friend suggest that sorting of data should be in possible with in client side. So that, n/w traffic can be reduce.

Now, this seems to be valid suggestion to me, but now my concern is, Do i need to embed sorting logic into a js file and send it along with data and now if user want to sort data, one of the function in js will do this job. This is how i think it should work. Is their any other way also? If you feel this is not valid suggestion, please put your reason too.

We will use struts2 for the project as web-app framework. Also, it would be nicer if you answer same question keeping in mind Node.js also ( :) ).
Jul 9 '14 #1
2 1412
Sorted data will take same amount of bytes as that of unsorted data. How is it going to save bandwidth.
Jul 10 '14 #2
gits
5,390 Expert Mod 4TB
in fact this strategy will reduce traffic - since for the sorting there is no further request needed and thus the sorted data don't need to be retransferred again after being sorted on the appserver or database. it does in fact even reduce load on the appserver or database at all that way and puts load to the client.

and yes - for it to work - the client would need to have the executable sorting logic - probably implemented with JavaScript. This sorting logic can work in different ways - to suggest a 'optimal' way depends on the data-format that is underlying. Do you have only dom-nodes with the values or do you have the data in Json-Format etc.?
Jul 11 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Gareth Gale | last post by:
I'm trying to implement a way of allowing a user to sort a HTML table via Javascript on the client. I've seen lots of samples where single column sorting (asc or desc) is shown, but I'd like nested...
22
by: mike | last post by:
If I had a date in the format "01-Jan-05" it does not sort properly with my sort routine: function compareDate(a,b) { var date_a = new Date(a); var date_b = new Date(b); if (date_a < date_b)...
8
by: Amy DBA | last post by:
OK, I'm stumped now. I need help restoring a tablespace that has been marked offline. Here's a little background on the problem: 1) There was a hardware failure that caused the tablespace to...
2
by: Buck Turgidson | last post by:
I have an SAP development system running on Linux. It is not a critical system, but I would like a restore-able backup. I have taken an offline backup, but I am unable to restore it. I am...
4
by: cbielins | last post by:
One of our tablespaces is in an offline state: Tablespace ID = 9 Name = xxx_xxxx Type = Database managed...
0
by: Gerard | last post by:
Hi, I have written an application that needs to monitor changes to a synchronized offline folder while the user is *not* connected to the network. I have used the FileSystemWatcher and it works...
6
by: Simon Harvey | last post by:
Hi everyone, We have a need to make a Windows Forms (2.0) client application that will be installed on our clients site. The data that the application uses needs to be centrally available to a...
0
by: gopi2ks | last post by:
HI I USE THIS below code for sorting but, when we are click sorting columns , then it will showing the next page rows in sorting also, i need only this page rows only sorting waiting for ur reply...
2
by: Erik Funkenbusch | last post by:
Can anyone point me to some resources for larger scale web apps in asp.net? I'm looking for application architectures, best practices, etc... I've spent a lot of time googling this. Most of what...
17
by: darien.watkins | last post by:
Kindof a poll, kindof curiosity... What is your favorite python - database combination? I'm looking to make an app that has a local DB and a server side DB. I'm looking at python and sqlite...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.