Month: April 2012

How Big is TOO BIG for JSON?

Most developers know by now that JavaScript Object Notation (JSON) is the best way to work with data sets in JavaScript. Yesterday, I blogged about “When To Use Pagination in REST Resources” and advocated for better UX Design instead of pagination. This generated another question: “Just how big is TOO BIG for JSON? In the context of a desktop browser, there are many factors to answer this question that include file, memory and object size as well as transport and loading time. I wanted find the “sweet spot” for speaking to the maximum usable size of a JSON object. So I decided to test desktop browsers to see how they handle JSON at different sizes. At some point, I would also like to see how this translates to mobile devices. The JSON samples were pulled from customer data in sizes ranging from 1 record to 1,000,000 records. Each record averages around 200 bytes a piece. The core HTML file only loads the JSON file and sets it to the testData variable. The following is an example JSON object used in this test: JSON Object JavaScript var testData = [ { "ACCTOUNT_NUMBER":"1234567890", "CUSTOMER_NAME":"ACME Products and Services, Inc.", "ADDRESS":"123 Main Street", "CITY":"Albuquerque", "STATE":"NM", "ZIP":"87101-1234" } ] 12345678910 var testData = [     {          "ACCTOUNT_NUMBER":"1234567890",          "CUSTOMER_NAME":"ACME Products and Services, Inc.",          "ADDRESS":"123 Main Street",          "CITY":"Albuquerque",          "STATE":"NM",          "ZIP":"87101-1234"     }] Five (5) samples per browser were taken to create the averages. Originally ten (10)...

Read More

When To Use Pagination in REST Resources

My team and I advocate the use of RESTful Service Oriented Architectures (SOA) to our organization where we work with many large data sets used in web-based applications. We strongly believe that the application should live in the client and that the server should be used as a services layer for providing and persisting data. Allowing the client to pull the data it needs can be useful for creating seamless user experiences that include features like sorting, filtering and searching without multiple trips to the server. Recently, a question was asked about the right time to introduce server-side pagination to the JSON responses. There are many variables that can impact this decision. Before immediately jumping to pagination, step back and ask yourself a few of these questions. How will your users interact with the data? It is important for a developer to know their audience and the audience’s workflow. Understand how users need to work with the data. If you are displaying unnecessary data or doing unnecessary work, this will ultimately slow down the experience. Spending time understanding user processes and finding technical ways to solve problems is just as much the developer’s job as it is the Business Architect’s and UX Designer’s jobs. Does the current workflow need a change? The current process might simply require a facelift. Just because a process has been followed for years, doesn’t mean that...

Read More

About Me

Josh Zeigler

My name is Josh Zeigler and live in Powell, Ohio. I am a family guy, tech geek, sports nut, Disney addict, and amateur triathlete. This is my personal blog site and digital playground. Here, I write about my life and anything that is on my mind...

More about Josh Zeigler


Recent Tweets


Pin It on Pinterest