An API for JavaScript/jQuery client webapps providing CRUD access to Google Apps Script scriptDB - a free noSQL databases. This adds to a VBA API for Excel already published. Now Excel, Google Apps Script and JavaScript clients can share the same noSQL database and data.
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheetBruce McPherson
Another in the 'do something useful with Google Apps Script' series. This time you'll see how to use the Analytics service and use exponential backoff to mitigate for quota rate limiting.
Do something in 5 minutes with gas 1-use spreadsheet as databaseBruce McPherson
Here's one in a series of tutorials where you can do something useful from scratch in 5 minutes using Google Apps Script. This example shows how to use a Google Spreadsheet as a database
OAuth2 Goa library for Apps Script tutorial including how to use the Google Developer console dashboard. Handles Google and other providers as well as Service accounts.
Do something in 5 with gas 4- Get your analytics profiles to a spreadsheetBruce McPherson
Another in the 'do something useful with Google Apps Script' series. This time you'll see how to use the Analytics service and use exponential backoff to mitigate for quota rate limiting.
Do something in 5 minutes with gas 1-use spreadsheet as databaseBruce McPherson
Here's one in a series of tutorials where you can do something useful from scratch in 5 minutes using Google Apps Script. This example shows how to use a Google Spreadsheet as a database
OAuth2 Goa library for Apps Script tutorial including how to use the Google Developer console dashboard. Handles Google and other providers as well as Service accounts.
Do something in 5 with gas 8-copy between databasesBruce McPherson
Google Apps Script tutorial to copy between abstracted databases.This example shows how to integrate spreadsheets, MongoDB and Drive. You should be able to complete this tutorial in about 5 mins and a few lines of code.
Do something in 5 with gas 9-copy between databases with oauth2Bruce McPherson
Google Apps Script tutorial to copy between abstracted databases. In this example, one of the databases (Google DataStore) needs OAuth2 authentication. You should be able to complete this tutorial in about 5 mins and a few lines of code.
This presentation will demonstrate how you can use the aggregation pipeline with MongoDB similar to how you would use GROUP BY in SQL and the new stage operators coming 3.4. MongoDB’s Aggregation Framework has many operators that give you the ability to get more value out of your data, discover usage patterns within your data, or use the Aggregation Framework to power your application. Considerations regarding version, indexing, operators, and saving the output will be reviewed.
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012Amazon Web Services
Object modeling is a common practice in mobile applications. We present two methods for modeling objects backed by Amazon DynamoDB, the AWS Persistence Framework for Core Data and DynamoDBMapper. We cover the benefits and limitations of these two solutions and demonstrate sample applications built with both technologies.
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your DataMongoDB
Immediate feedback is an essential part of modern application development where developers want to sync across platforms, systems, and users to provide better end-user experiences. Change streams empower developers to easily leverage the power of MongoDB's internal real-time functionality to react to relevant data changes immediately. Change streams also provide the backbone of MongoDB Atlas triggers. This session introduces change streams and walks you through developing with them. We will discuss use cases, integrating with Kafka, and explore how to make good architectural decisions around this new functionality.
MongoDB is popular choise for data persistence which had no support for ACID transactions up until v4. Even having such support, transactions incurs higher performance cost and can lead to deadlocks.
In this talk I will explain challenges of achieving data consistency in systems that does not support AСID transactions, how to communicate state changes in a reliable manner and the approach to ensure eventual consistency of data with examples in C#.
Run programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk, offering over 80 high-level operators that make it easy to build parallel apps. And you can use it interactively from the Scala, Python and R shells. Spark powers a stack of high-level tools including Spark SQL, MLlib for machine learning, GraphX, and Spark Streaming. You can combine these libraries seamlessly in the same application.
Spark runs on Hadoop, Mesos, standalone, or in the cloud. It can access diverse data sources including HDFS, Cassandra, HBase, and S3.
Aram is a Senior Software Engineer at PicsArt's Analytics team. Aram has about 6 years of experience in software development. His interests are Scala, Big Data Engineering and playing guitar
Do something in 5 with gas 8-copy between databasesBruce McPherson
Google Apps Script tutorial to copy between abstracted databases.This example shows how to integrate spreadsheets, MongoDB and Drive. You should be able to complete this tutorial in about 5 mins and a few lines of code.
Do something in 5 with gas 9-copy between databases with oauth2Bruce McPherson
Google Apps Script tutorial to copy between abstracted databases. In this example, one of the databases (Google DataStore) needs OAuth2 authentication. You should be able to complete this tutorial in about 5 mins and a few lines of code.
This presentation will demonstrate how you can use the aggregation pipeline with MongoDB similar to how you would use GROUP BY in SQL and the new stage operators coming 3.4. MongoDB’s Aggregation Framework has many operators that give you the ability to get more value out of your data, discover usage patterns within your data, or use the Aggregation Framework to power your application. Considerations regarding version, indexing, operators, and saving the output will be reviewed.
MBL301 Data Persistence to Amazon Dynamodb for Mobile Apps - AWS re: Invent 2012Amazon Web Services
Object modeling is a common practice in mobile applications. We present two methods for modeling objects backed by Amazon DynamoDB, the AWS Persistence Framework for Core Data and DynamoDBMapper. We cover the benefits and limitations of these two solutions and demonstrate sample applications built with both technologies.
MongoDB .local Toronto 2019: Using Change Streams to Keep Up with Your DataMongoDB
Immediate feedback is an essential part of modern application development where developers want to sync across platforms, systems, and users to provide better end-user experiences. Change streams empower developers to easily leverage the power of MongoDB's internal real-time functionality to react to relevant data changes immediately. Change streams also provide the backbone of MongoDB Atlas triggers. This session introduces change streams and walks you through developing with them. We will discuss use cases, integrating with Kafka, and explore how to make good architectural decisions around this new functionality.
MongoDB is popular choise for data persistence which had no support for ACID transactions up until v4. Even having such support, transactions incurs higher performance cost and can lead to deadlocks.
In this talk I will explain challenges of achieving data consistency in systems that does not support AСID transactions, how to communicate state changes in a reliable manner and the approach to ensure eventual consistency of data with examples in C#.
Run programs up to 100x faster than Hadoop MapReduce in memory, or 10x faster on disk, offering over 80 high-level operators that make it easy to build parallel apps. And you can use it interactively from the Scala, Python and R shells. Spark powers a stack of high-level tools including Spark SQL, MLlib for machine learning, GraphX, and Spark Streaming. You can combine these libraries seamlessly in the same application.
Spark runs on Hadoop, Mesos, standalone, or in the cloud. It can access diverse data sources including HDFS, Cassandra, HBase, and S3.
Aram is a Senior Software Engineer at PicsArt's Analytics team. Aram has about 6 years of experience in software development. His interests are Scala, Big Data Engineering and playing guitar
Integrating React.js Into a PHP ApplicationAndrew Rota
React.js has taken the web development world by storm, and for good reason: React offers a declarative, component-oriented approach to building highly-scalable web UIs. But how can we take advantage of a JavaScript library like React in our server-side PHP applications. In this talk l cover the different ways React.js can be integrated into an existing PHP web application: from a client-side only approach to multiple techniques that support full server-side rendering with a Node.js server or PHP’s v8js. I also discuss the trade-offs in each of these designs and the challenges involved with adding React to a PHP site. Most importantly, I consider the higher-level issue of how to improve view cohesion across the client-server divide in a PHP application.
Chicago Coder Conference 2015
Speaker Biography: Wei Ru
Wei Ru has over 15 years of professional experience in design and development of Java enterprise applications across multiple industries. Currently he works as a technical architect at STA Group, LLC. He received a M.S. degree in Computer Science from Loyola University Chicago. As a software developer with an emphasis on Java, he strongly believes in software re-usability, open standards, and various best practices. He has successfully delivered many products using open source platforms and frameworks during his IT consultancies.
Speaker Biography: Vincent Lau
Vincent Lau has been Senior Architect at STA Group in Chicago for the last two years. He received a B.S. degree in Accounting and Finance from the University of Illinois at Chicago and worked on M.S. of Computer Science at DePaul University. He has over 15 years of software design, development, testing and project management experience on large enterprise distributed computing platforms. Most recently, he has worked on web based applications using Java, Spring, JavaScript, Angular.js, jQuery and web services. He previously had Senior Software Engineer and Lead positions in Royal Caribbean Cruises, Wells Fargo Bank, Cap Gemini America and Trans Union Corp.
Presentation: Practical AngularJS
AngularJS has been seen gaining momentum recently. Whether you want to develop a modern single-page application or to spice up only the view enabled by a traditional MVC web framework, AngularJS allows you to write cleaner, shorter code. AngularJS’ two-way data binding feature allows a declarative approach on views and controllers, and ultimately code modulization. With this strategic change and many features offered by AngularJS, learning AngularJS can be challenging. In this session, we will share some of the experiences we had in Angular UI development, we will cover:
AngularJS modules and common project setup
Communicating to a Restful service
Commonly used Angular functions, directives
UI Bootstrap, grid views and forms in AngularJS
Custom Angular directives
Asynchronous functions and event processing
Simplify Access to Data from Pivotal GemFire Using the GraphQL (G2QL) ExtensionVMware Tanzu
GemFire GraphQL (G2QL) is an extension that adds a new query language for your Apache Geode™ or Pivotal GemFire clusters allowing developers to build web and mobile applications using any standard GraphQL libraries. G2QL provides an out-of-the-box experience by defining GraphQL schema through introspection. It can be deployed to any GemFire cluster and serves a GraphQL endpoint from an embedded jetty server, just like GemFire’s REST endpoint.
We will be demoing G2QL using a sample application that can read and write data to GemFire and share data between applications built using GemFire client APIs, showing you:
- How to use GraphQL to query and mutate data in GemFire
- How to use open-source GraphQL library to build web and mobile applications using GemFire
- How to use GraphQL to deal with object graphs
- How G2QL can simplify their overall architecture
Presenters : Sai Boorlagadda, Staff Software Engineer & Jagdish Mirani, Pivotal
Logisland is an event mining OpenSource platform based on Kafka/spark to handle huge amount of event, temporal data to find pattern, detect correlation. Useful for log mining in security, fraud detection, IoT, performance & system supervision
GraphQL is an application layer query language from Facebook. With GraphQL, you can define your backend as a well-defined graph-based schema. Then client applications can query your dataset as they are needed. GraphQL’s power comes from a simple idea — instead of defining the structure of responses on the server, the flexibility is given to the client. Will GraphQL do to REST what REST did to SOAP?
Working with disconnected data in Windows Store appsAlex Casquete
When developing applications for mobile devices (Windows Store or Windows Phone) we have to deal with connected data scenarios using cloud web services, and disconnected scenarios where data is stored locally. In this session we will explore all options to store information locally and remotely (files, Isolated Storage, IndexedDB, SQLite, NoSQL DBs and Azure Mobile Services), and how to build a system for synchronizing data when using a combination of these systems.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
UiPath Test Automation using UiPath Test Suite series, part 5DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 5. In this session, we will cover CI/CD with devops.
Topics covered:
CI/CD with in UiPath
End-to-end overview of CI/CD pipeline with Azure devops
Speaker:
Lyndsey Byblow, Test Suite Sales Engineer @ UiPath, Inc.
2. what is this API for?
● Allow maintenance and query Google Apps
Script ScriptDB directly from a client webapp
● Share data in real time between Google
Docs, webapps and Excel (using VBA API
for Excel)
● a free noSQL database for javascript
webapps and Excel
3. COMPONENTS
the same handlers are used by
the VBA API
Your
Your
Your
code
code
client
code
cookie
simple
noSql
Your
ScriptDB
dispatcher
rest
scriptdb
API
scripdb api credentials
Your
Your
code
Multiple
code
ScriptDB
Your GAS
webapp
Handler (s)
GAS
Library
API
4. access control
User and
Access
type
credentials
your entry/
your scope
cookie
●
●
Can be used to control access operations by
endpoint
Only needs to be stored one time
new cScriptDbCom().setScriptCredentials( {
endPoint : gasHandlerEndPoints.scriptdbrequesthandler,
restAPIKey : 'xliberationApp',
scopeEntry : 'rest',
credentialsEntry: 'dbTest',
clientKey:'xliberation',
library: 'dbTest',
needDebug: false,
needOauth: false } );
5. comparison with parse.com and
VBA scriptDB API
VBA and GAS Main Apps are virtually the
same code irrespective of the whether parse
or scriptdb is used
VBA and javascript clients have similar code
and share the same GAS handlers and
databases
cParseCom VBA
API
cScriptDBCom
VBA API
cParseCom
GAS API
cScriptDBCom
javascript API
parse.com restAPI handler
GAS scriptDB webApp and API library
parse.com cloud based noSQL
database
GAS scriptDB cloud based noSQL database
6. note on examples
All the examples that follow put their results in a
page element using this function
/* display contents of some object at given element
* @param {object} control some object
* @param {string} id the id of the element
* @return {null}
*/
function renderScriptDb(control,id) {
$(id).text(JSON.stringify(control));
}
7. optimization and batching
● The gas library api will batch all requests it can.
● Batching is done automatically by the API
● Operations are asynchronous and orchestrated by
promises
getScriptDb("VBAParseCustomers","dbTest").getCount()
.done (function (data,cob) {
renderScriptDb(data.count,'#countcopycustomers');
})
.fail(function (data,cob) {
renderScriptDb(JSON.stringify(data),'#countcopycustomers');
});
8. example - create object (s)
Data is stored in silos within one or more ScriptDb
one object
dbTarget.createObject(data)
.done ( function(data) { .. do something good .. })
.fail ( function (error) { .. do something bad.. });
multiple objects
db.createObjects([some objects...])
.done( function (data) {...it worked..})
.fail( function (error) {...it failed..});
9. example - do a query
Queries are by example, and can include limit/skip
var dbCustomer = getScriptDb("VBAParseCustomers","dbTest");
dbCustomer.getObjectsByQuery({country:"United States"})
.done (function (data,cob) {
renderScriptDb(data.results,'#countryquery');
})
10. example - update objects
All matching objects are updated to the given value. New
fields are created, existing fields are replaced
getScriptDb("testClass","dbTest").updateObjects({town:’chicago’},null,{state:'IL’'})
.done(function(data){
renderScriptDb(data,'#bitupdate');
})
.fail(function(error){
renderScriptDb(error,'#bitupdate');
});
11. example - count matching objects
Count operations can have optional queries
getScriptDb("VBAParseCustomers",entry).getCount({country:"United States"})
.done (function (data,cob) {
renderScriptDb(data.count,'#countquery');
})
.fail(function (error,cob) {
renderScriptDb(fSON.stringify(error),'#countquery');
});
12. example - get object by id
Each object is assigned a unique Id returned by queries
getScriptDb("VBAParseCustomers",entry).getObjectById(objId)
.done (function (data,cob) {
renderScriptDb(data.results,'#id');
})
.fail(function (error,cob) {
renderScriptDb(JSON.stringify(error),'#id');
});
13. example - delete objects
All objects matching the query are deleted
dbTarget.deleteObjects({customerid:1})
.done (function (data,cob) {
renderScriptDb(data.results,'#delete');
})
.fail(function (error,cob) {
renderScriptDb(JSON.stringify(error),'#delete');
});
14. limits and skipping
Queries are subject to limits, so you can work multiple passes for big queries using skip/limit. A recursive convenience
method is provided to use, and show you how to do it (eg. db.getAllMatchingQueries({state:’IL’}) will take care of this
automatically as below - but watch out for memory usage)
self.getAllMatchingQueries = function (queryJob, queryParameters,list, defer) {
list = list || [];
defer = defer || $.Deferred();
var jobSkip = {skip:list.length};
self.getObjectsByQuery (queryJob, self.mergeParameters(queryParameters, jobSkip))
.done (function (data,defers) {
if (!data.results.length) {
defer.resolve(list);
}
else {
for (var i = 0 ; i < data.results.length; i++) {
list.push(data.results[i]);
}
self.getAllMatchingQueries(queryJob,queryParameters,list,defer);
}
})
.fail (function (error,defers){
defer.reject (error);
});
return defer.promise();
};
this is
automatically
handled for update
and delete
15. notes on finalFlush()
Because POST operations are batched, you need to call finalFlush() at some
point for each scriptdbcom instance. This clears any batch queues and resolves
any outstanding promises. It can be called as often and whenever you like, but
should be called at least once if there have been any POST type operations
(CREATE,UPDATE,DELETE), following the last one. Note that POST
operations are not resolved until they have been successfully flushed from the
Batch Queue.
finalFlush() also returns a promise for when all its work is complete.
dbTarget.finalFlush().then( function (data) { … do something , its all over… } );
16. dates and times
These are handled the same way as parse.com
"date":{
"__type":"Date",
"iso":"2013-08-22T00:00:00.000Z"
}
17. silos and parse classes
● A Silo is like a parse Class. For 2D data it can be
considered like a table.
● Multiple classes can be held in the same scriptDB.
● scriptDB siloing is handled automatically
● A seperate cScriptDbCom instance should be
instantiated for each class being worked on
18. multiple scriptDB
● The scriptDB dispatcher handled which actual scriptDB
to write to.
● Multiple DBs can be used by referencing multiple
libraries in the scriptDB dispatcher.
● Library names will be signalled to the dispatcher if they
are in the setup for this entry
19. restricting operations
You may want to allow a different kind of access to certain users.
●
provide a different URL or use the app keys to signal some restricted access , and include something like this in
the doGet() and doPost() functions
var whatsAllowed = ['query','count','getbyid'];
●
setting that configuration up under a different entry
new cScriptDbCom().setScriptCredentials( {
endPoint : gasHandlerEndPoints.scriptdbrequesthandler,
restAPIKey : 'xliberationApp',
scopeEntry : 'rest',
credentialsEntry: 'dbTest',
clientKey:'xliberation',
library: 'dbTest',
needDebug: false,
needOauth: false } );
20. accessing from other apps
● The scriptDB GAS handler API can be
accessed using any rest query mechanism.
● The VBA API and javaScript just manages
the conversation with the scriptDB GAS
handler
● Examples of other languages will be on
Excel Liberation at a later date.
21. public facing scriptdb
OAuth2 support is not yet released for the JavaScript
version (it is with the VBA one). This is because Google
Apps Script doesn’t yet support CORS (cross origin
resource sharing) for javaScript clients.
A temporary workaround for access control is described
here.
22. further detail
All this code is downloadable or copyable from
Google Apps Script Libraries.
For more information see Excel Liberation