Logo TIB AV-Portal Logo TIB AV-Portal

Using PostgreSQL in modern enterprise web applications

Video in TIB AV-Portal: Using PostgreSQL in modern enterprise web applications

Formal Metadata

Title
Using PostgreSQL in modern enterprise web applications
Title of Series
Number of Parts
21
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Identifiers
Publisher
Release Date
2012
Language
English
Producer
FOSSLC

Content Metadata

Subject Area
Abstract
Using HTML5, JavaScript, NodeJS with PostgreSQL PostgreSQL's object relational heritage makes it an outstanding choice for developing web applications that have a rich object model domain. See how PostgreSQL's object relational features allow for building database models to support a NodeJS data service feeding a 100% JavaScript web client. PostgreSQL's object relational heritage makes it an outstanding choice for developing web applications that have a rich object model domain. See how PostgreSQL's object relational features allow for building database models to support a NodeJS data service feeding a 100% JavaScript web client. Topics include: The benefits of a rich domain model in enterprise software, Comparing different architecture approaches: scripted model, table model and domain model. The dissonance between relational databases and the object model. Why NoSQL database's seem attractive Why relational is still the best choice for enterprise applications What is an "object relational" database Using Postgres' object-relational features to reduce the friction Compound Types Querying an object hierarchy Object relational views Exploring an example Define a rich domain in a JavaScript MVC web client Build a data source using NodeJS using PostgreSQL JavaScript drivers Defining models in Postgres Extending models in Postgres Yes, it's got a Hemi Use Google's plV8js language in PostresSQL to run JavaScript directly in the database Parse and process JSON payloads
tuple tier enterprises Open Source Databases clients stiffness backend computational production graphical user interface CRM extent CAMS ERP classes web script views Open Source clients production particle Computer animation intrusion detection systems functions Video
tuple enterprises time potential web architecture tablets framework CAMS platforms ERP web presentation enterprises applications tablets Types Rich client Computer animation software framework platforms family near current
point tuple code table Open Source Domain browser clients architecture mathematics model diagrams CAMS descriptions enterprises Transactional applications system call frame Computer animation pattern Domain model sort services
Gateway polymorphic tuple functional programming script equal ones Databases module part Transactional configuration different record classes script enterprises polymorphic namespacing Transactional hierarchy interfaces Right sort structure record table Sequel fields objects hierarchy model spaces environment procedure structure CAMS set Maßstab Gateway interfaces fields Databases lines applications Computer animation CRM classes set table
tuple functional programming system call time oriented decision clients perspective programs object model objectives Multiple classes enterprises email attributes means orders Domain procedure sort objectives record Super table Domain characteristics similar fields attributes period objects root model structure Maßstab Super information workgroup coma Databases lines applications system call evaluation Computer animation software case functions CRM classes model table
polymorphic tuple presentation Actions map time Relational functions part energy perspective redundancy programme memory Geschwindigkeit object model Query Video objectives vertices amenities systems classes enterprises polymorphic mapping Relational fit bits impedance variables hierarchy orders sort objectives structure Super enterprises table Sequel Domain varieties impedance objects terms hierarchy Symmetry structure report choice varieties Super Databases volume applications objects Computer animation Query functions formal Gravity classes model table
tuple Context enterprises Super map Relational queries Types different terms object model objectives structure addresses set man choice relation Super mapping Relational effects coma Databases applications Types objects Computer animation Query Now statements convex hull Right model objectives table data types write record WAN
tuple table Sequel 3rd Contracts sun Emulation Types objects objectives Representation selection statements CAMS Sum addresses stable classes satellite sin inner Databases Types processes Computer animation statements Right table record
tuple email table user interfaces maximal 3rd open subsets fields Types objectives statements CAMS Sum addresses source email Multiple coma Types inertia Computer animation angles case URN convex hull table record
tuple Slides Actions total sun second Types objects Rolling law convexity CAMS addresses email sin bracket law inner entire mathematics inclusion Types words Computer animation real vector Query pattern Domain odd record
choice tuple presentation decision views clients energy web single case framework processes Office script enterprises programming language Arm real tier traction bits measures web applications processes Right ideal fundamental current server app programming language Open Source Domain real drivers browser number architecture web Graph forces projects clients applications browser objects Computer animation case model services margin
classical tuple Super flow programming language construction characteristics formating Contracts variables number second prototype notation objectives addresses classes script programming language email Super real bracket construction processes Computer animation environment classes Domain sort objectives record WAN
tuple server services time sources unit clients argument service objects objectives set conditions sources services key runtime real storage argument workgroup instance applications scalability potential Types events Computer animation case Query platforms website conditions model Results record
Gateway tuple app building Actions Super Sequel code drivers open subsets number BDD write service testing scratch CAMS cloud script app sources response Gateway information decision drivers applications system call inclusion Types processes Computer animation statements cloud testing Conversation procedure
principals tuple functional programming presentation Actions Sequel code functions argument versions Google software objectives CAMS systems area presentation email response Ionic coma instance system call processes Computer animation statements
software engineers man email mapping Sequel formating Menu functions variance Computer animation case string square statements objectives convex hull addresses optimal
tuple rules mapping views formating views Relational Databases Databases catalog rules Computer animation hypermedia Query Query objectives console queue CAMS form
registry tuple software engineers Context table map Databases storage clients rules structure CAMS classes default rules mapping views namespacing coma Databases registry Types means Computer animation ORM table structure tuple spaces extent
mapping Sequel ones raids fields category Types Computer animation gute objects URN string objectives Sum table Security data types
tuple functional programming mapping table files map views Relational Databases storage CRM ORM set classes default rules email views clients registry category Computer animation retrieval ORM convex hull objectives structure record extent
tuple man Actions email Sequel maximal coma functions Content regular statistics Computer animation objects topology statements record Sum CAMS addresses record
tuple sources man functional programming beta Google Chrome interfaces argument several web Types Pointer message-based Computer animation configuration quantum Query statements Right ensemble CAMS conditions record
script sources tuple functional programming unit beta Context server Google Chrome interfaces views clients infinity processes Computer animation Query model objectives Results
point tuple functional programming server services time equal clients number specific objects CAMS addresses classes systems script functional programming namespacing server Transactional Databases staff system call static Computer animation case functions classes procedure Results record
tuple functional programming Google Chrome GRASS argument Query CAMS surjections classes systems Windows sources enterprises unit beta server Types message-based static Computer animation URN functions classes Results addresses
area graphics engine ones maximal clients browser part applications production static computer processes Computer animation case Rolling CAMS
Mutual unit Context demon indicators browser open subsets Sans Arm Computer animation Rolling law circle pattern Sum WAN
tuple building beta states code time views sources Databases clients part programs subset web hypermedia core objectives Partial stable area man sources mapping load Development The list storage entire tablets Types category repository URN interruptions website Right sort Results record app Sequel link varieties browser infinity van versions prototype Forum objects terms Google Authorization location-based services testing addresses set noise response information forces projects coma clients Databases lines applications Computer animation case table Windows
web pages man tuple screens varieties Tiled high resolution plan coma Computer animation module record form factor logic Windows spaces
point functional programming building bottom Sequel code views decision equal sources Stream clients part Kapsel fan programs Central mathematics objects object model level objectives box testing framework position systems area BDD Development load feedback projects storage effects lines structured data Query Right Text Mining editors Abstract
the death the top here to attend another and in here is that the that's what I'm
talking about so this informatics with an open source that you have the company of about 10 years or so of the probable running company we have about 300 commercial uses the benefits of particle post where we think there's about 30 thousand but it is a matter of right now our product is to here we used PostgreSQL exclusively as since inception of the company and that's the back end and then we've got korea class a k desktop client of finding and that with and so users have to you can see that applying to get that to work and you can some extension with that currently without a script so that is the
reality felt that who we are as still were making at basically counting is like that so I wanted to described you kind of this journey we've been through and looking at new technologies is they've been coming out I want to describe the current architectural crossroads that were at an age is experience experiences we have a few examples of tools but the idea is to give you Israel framework of and if you're interested in earpiece self platform maybe you'd be interested in getting involved in our community and I'm not here to say that this is the right way the only way to use these tools is that as solutions that have worked for for a stingy working for us and we don't think are problems the unique so hopefully you'll find some value that I
began to use it as best they stay quiet and we've resisted going to web architecture for a long time because if you've ever worked with the canteen near type software but it's a struggle to do on the web because he's a transaction-intensive applications people expect them to be very snappy and and and how they are in a traditional desktop experience so we waited a long time to look at this that with the advent of of 5 I we think thought that the Web technologies family going to play for we can provide the user experience is equal to or better than traditional rich desktop quiet so that means that we can get a start from a clean slate and strength clean slate we yourselves 1st well what can we do better than what we're doing now so
that on the left is a diagram with where you wanna call a classic client adds the C + + 1 qt talks directly to PostScript of where the web client were happening in basically to go to a three-tier architecture or we've got the clients and we need an application and data services that talks PostScript interest company the tools all have to be open source and then of course the whole point of this is the will the let quite have performed better as well or better than the native application we have today so I just
don't believe me on this topic months that I have a great book on is called the patterns of application that about application architecture and point out will benefit that I thought was useful for us in sort of framing of thoughts about this change and he describes 3 different approaches to building a large enterprise the application is the 1st descriptive model and we'll call that actually people module and the wall of the and then a rich domain model so transactions
script model but despite everything that happens in the application is just some kind of busy straight sequel callers equal transactions this little example there and we have a couple functions in our database called one's called contact in of called the delete a contact that with that over a thousand functions like this in our database at that the reason this is an attractive option is simple get started procedural and and when we started the company you have to go this is what we want with because it was easier to get started that's always important from start something new but there's no notion in this sort of architecture of a namespace request hierarchy and what happens is when the application starts to get larger this sort of thing is really hard to scale it is challenging to manage thousands of different transaction functions so for
quite a while I was actually wanting to pursue you have a table model approach and and Microsoft Word you hear this a lot is called active record I think it's probably in the world to but in this situation basically the tables become classes so you have about 1 class for table and you have some kind of Gateway Interface between application and database that organizes this you manipulate the data in we're recall records sets and the nice thing about this is at least starting fresh is easy to just spend your whole object part the right off table structure in the database and doesn't really do polymorphism that well in the data field structure can be really limiting and that was the struggle I had because we have this legacy applications I didn't really turn out that the table the relationship between the tables of the subjects were one-to-one and kind of forced into that arrangement just never quite work out who will decide to go on this
new have we had to that making some decisions and then that that time that this so rich domain model so this is a fully object oriented approach and using the model and that is from the client's perspective you've got the data and functions methods encapsulated in objects right so anybody who's worked on in any kind of oriented programming is is pretty familiar with this the disadvantage of inheritance and you can have multiplied attributes so any given data field might have more information than just the data itself by including the required fields and another faults behaviors like that you make a call a function in which domain model and it may call the whole network of objects to get an answer it's not just a simple procedure functions and like the first one I spoke about so the idea this is it's still where things get complicated when I say complicated I'm thinking of an invoice invoices that for us the header line items pricing customer records and things that and and what I want my favorite taxes on a period of taxes the taxes this maddening terribly complicated so I just going structure offers the hope of handling that an elegant way so that talking about the rich domain model is that those in classes are not necessarily the same thing so you have to have a day and as it is possible that the like
abbreviated example of what an object model will look like in application application at the root we've got to have a general objects in our case is used for handling getters and centers and the value observing the and there is a record adjective inherits from that which is has a lot of similar characteristics to a database table the not exactly but that record management object and evaluation privileged influence on handles parent-child relationships and then use it in our case we have a document object that inherits from that which represents sort of high-level documents like customers and orders and things that handles numbering specifically from that taxes the minute ago we have attacks class at Harrods from all of things that deals with the tricky business of taxes and everything that flows into an invoice object which itself has many objects right now I mention it has a customer ship to object invoice line pricing money objects and things like that so you can see how quickly an object model can get pretty sophisticated but that in the case of an enterprise that that's great possessive meaning
now fortunately I didn't spend too much time billing as part of the presentation because it was a lot of energy now but I will just make mention of that we spent some time looking in the sequel databases ourselves and in in amenities is at 1st it looks attractive because I'm saying we wanna go to an object model systems and is well known it's penetrated business sometimes you get a relational database to work well and an underground environment and in since all these single databases are basically working with objects it just seem like a nice fit so this this technical term of public from memory might have heard called object-relational impedance mismatch that describes what makes it attractive to use at least in from our perspective another a lot of other reasons mentioned you know and their mapping I was just talking about and also out more ornament action most this is about a mapping and that's a lot of hard work and chief you could avoid that work it should be nice and most relational databases lack object features such as sort of this notion of classes the polymorphism and inheritance and then again the mapping is hard work with relational databases so proud of reasons if they made in this
equals the way to go laplace but we after beginning is a bit without really determined that were fine with a relational database at least for our application and 1 of the things that we analyze the c conference last years that that what there's a couple people talked about 3 big programmers so if this is the open 1st business conference through the grammars behind mystical databases are problem of velocity volumes and variability velocity being made is the 0 that's needed the database is really just a huge volumes of data like video think about you to it the large amount of videos that gravity is the problem where the data is unknown exactly what the structure is going to be so they want abilities for any kind of structure in the database that will and in the end velocity blindness it's just coming like that well those are the problems that we have to deal with so much of our big problems are having to do much more so with output query output so in an enterprise applications the data structures a fairly predictable so we know what a contact is joint customer is we notice sales order is so it's no problem for us to define these things ahead of time but we don't know is how people 1 report on these things every companies got their own way that they want to see the data and so it's more important that we be able to query across tables in a variety of ways now that the easy and I don't know how many of you've played with China query across nodes and hierarchical models but it's it's difficult it's not something you you you have to work and that if you would the really big gap that's changing all the time the customer's always 1 new ways of looking at things it's it's not effective at all also like this
term CJD came up and with 1 of his writings that relational databases are application neutral and this is really the clincher for us so we have this notion of contacts in a database right and they're highly normalized they're all over the application context 1 the customers and vendors pounds ship-to addresses and so when we ask yourself this question well the context belong to an account account is like an organization and application or the Council on contacts within dealing with an object-oriented structure or database you have to choose and that's a real problem for us because as I said a minute ago people are always minus the data in different ways and we don't want to choose 1 of you will see the data both ways for the contacts are members of accounts and accounts for members of contacts and of course the relational theory solves the problem because they're related not necessarily parents of children of each other so 1 thing that's really neat about the fact that we just happen to be using PostScript already is on the fact that it's relational but a very handsome monitoring features have these for a very long time and effective in the beginning really it supports custom datatypes object inheritance and the query language in the schema support the set because it does these things this greatly simplifies our mapping problem and I'll show you what
I mean you work with compound types I really couple OK this is I think 1 of the greatest features about what's best it's really mean age difference in an hour away were we were using the database now so typically when you must select statements like this right FlexStar from and seeing teachers of contact table flexed from contact and you just get in on basic cable columns and rows in this which we used the same and so we wanted to go to and and a rich object model so we wanna start thinking of these things objects as it turns out
imposed better the contract is not just a table that is itself a type so if you do this select contact from contact you get all the contacts return as a single column and this is post best represent representation of an object here and as it turns out that if you really begin to the notion of a class and type in a database class and object system patent database are more or less the same thing so this is really helpful now here's a select statement defining on another table I'm selecting a contact 1st name last name and then picking up everything that addressed star everything from an associated address stable right so again this is just traditional columns and rows and country well what would they like this we're doing in a left joined so we get that addresses if they exist necessarily
interesting if I do that same sequel statement and take off the dot star what I get is so I'm just going the address as an object I get my columns for the contact this like I asked for and I get the address as objects or types proposed fish 20 types and this notice another 1 reason than using the jamming here's the nice job showing you the it addresses the type this is
interesting even know they are objects you can start up around the a syntax the filter on that the the types that you pull so in this case the citizens syntax were you rapidly in the table in parentheses and then died in a field you want so this is the same courage before going the contact feels only address as a complete type and and filtering on only the contact really addresses in Denver and the syntactic really simple for for these types is just open close parentheses and comma separated values in each of the other half you you you do appears this going on on this kind of syntax this is specific to the use of compound types and which is what I'm doing this is this is compound types that don't the work it would not work right but this up
here I'm looking at this from another angle find selecting on to many relationship where I'm trying to get all my contacts and 18 addresses and they may have multiple e-mail addresses is actually contact e-mail table so you can see here I am making Johnson bacteria from e-mail addresses so I get you to records for my Johnson victory here the victim when 1 might go on to make doctors down here 1 3 2 addressed so we use the if
I change my query and passes so this like an e-mail have whatever sub-query raffinose laws their 1 idea is and again the e-mail contact e-mail as a type in there is that the double brackets so what doing is is giving right so words same I might like patterns right here you can see at that both those e-mail address records wrapped in use curly braces which is how vector represents an array so this is not a good news 1st because it starts to get us into action that can help us get to the rich object domain 1 the following this is
just 1 more slide that shows how these last 2 things combined so now I'm asking for contact person last name the entire address types and then the convex e-mail as they are too many relationship so great we've learn
something new that we can do both stress and going back to visit a real world use case right so we've got this classical on the left and right about three-tier architecture on the right now in the decision to go with 8 a JavaScript architecture and specifically we're using a framework for our client called blossom which is brand new brand spanking new it's actually a force of about 4 and a revolver sprout for but it's a a rich framework that was developed by Apple and a spot now is an open source project on single RCM is is bad for or with a special view air office that all that here the and and that that we've chosen not just as as a as a tool to build our application and data services that we need and then we got some special JavaScript and post press of choice
you probably ask yourself really some of you can ask yourself the crossing arms and saying why justice and I'll tell you I work in a C + + shops JavaScript was not welcome as they did as a 1st language for application listed 1st it's 1 thing I was helpful is 50 allows us to extend our current app with JavaScript's at least they had some experience with it which open mind a little bit but that's the big now the here's were fundamental webapps and JavaScript is the language of the Web all browsers supported natively and if you have not been paying attention there is a lot of energy going into a JavaScript talk is now the becoming gray mature and they're very powerful in and 1 of the most important things about it is it allows us to do a lot of the processing the presentation processing on the client side instead of the server generating HTML and processing only request measure recall at the beginning I said drivers are in place of performance is critical for an application like ours and as you can tell and the also have a graph here happens to be the number 1 language is going have been notice is a pretty good margin of a lot of work being done much of a script about 1
objection is the yeah trying to build a rich domain the JavaScript that really has classes does it but I think that these quotes from that was scrapped further than his so the the laissez the job script the world's most and misunderstood language and I think it's already into but basically it has the characteristics we need to build an underground environment and has objects but there's a methods they can contain other objects has constructors in prototype on inheritance so as it turns out that the you know doesn't have objects in the classic sort of C + + definition that were used to but and you can get the behaviors we need to build the domain 1 built so long to talk about
Jason these days right actually it was profits but the number is the de-facto format if you're working with JavaScript because Jason's JavaScript Object Notation so a minute I would just looking at a contact record right well and here is 1 of those contact records represented in Jason you get the contract at the top and then address indented beneath it with the curly braces and then an e-mail is inside the residents inside array here that's a bracket by the Jews were races and here's are 2 addresses so this is the fact that we really work with if we're going to be using a JavaScript environment now the
blossom data so so working with them I think that some data sources blossom client has a data store the cute that's built into it and that's 1 of the reasons we chose it has actually developed for scrap or but it's very very powerful so has a status store I any expects to talk to a data source service at a server somewhere with an API that looks like this there's actually a lot to it is surprisingly simple but there there more to it than I'm showing you that these are the main things you need to be able to retrieve a record we reacts for the type of record you want is a contact the customer wanted an specific ID some kind of primary key and the also be available to commit a changed record as a unit of work were again you pass this is the type of record it is impossible to have it all the all the pieces of the object in the case of the invoice to include all the objects that are in an invoice and then we also need to do this this fetch called which is similar to the query we want get results with a whole bunch of potential bunch records again in this case you also have some conditions and parameters we get that results so the question is how do we get a set of PostScript I propose best you use equal status you know using that like this so that we need a
data service and we chose OJS uh is that I'm prone status time it's this again I just folders right after the node j if that were 1 . org website it describes what is at blocking no web services designed for serving up applications and data just like this and then at the node in jail is all about being travel to status thing up by basically adding more more instances of it to a server and all coordinate and course everything
from the gas is written in JavaScript 1 good thing about it is it's got a whole bunch of nice packages with really cool stuff including a PostScript driver that we're using but there's Open SSL WebSockets BDTs behavioral driven design testing and these just a few examples there are dozens and dozens action hundreds of packages already written for no JS so there's a lot of tools already so you have to build everything from scratch a lot of things already built so we took a lot of those tools on in particular web service is super performance and as I said before it's designed for distributed cloud apps is that this
number happens which means that runs through the scripts and it doesn't necessarily wait for an answer for example that makes a sequel call it doesn't if if you would if you're expecting an answer work to some particular call for value in the sequel statement it it just keeps running through the whole spread even without getting an answer you have to write your app for Europe Europe that yet if the regular applications in there just in a way that it responds to the information when it gets it so you might ask a question and then you have to put a listener have wait for the response of the process it when you get the answer it means it's super fast but it's kind of hard to write and procedural type code which we still need some of that so at 1st contact we try to use knowledge has to do an all-around Mapper it was just like way too difficult nobody really good at something things but this was not 1 of them so we decided to just make note a gateway for data
and we decided to take a look at how we can actually get this stuff out of PostgreSQL directly taking advantage of the objects when you actually supposed sorry hats so we found guilty a hosted on Google Code is written by the Toshiba rather than using your somewhere areas in the back so this is the kind of balanced chemical immediately after the school thing we're using all of the sudden and he said it was coming and that that so this is version of the and I guess it's 30 there and so his principal Stafford he's going to be doing a presentation here right after minus C in hear more from him there so not somehow
some our work in process using the Vietnam war which you is that when you step you you every connection to PostgreSQL that can get a has its own instance of the the Google engine and you can write functions that looks something like this so this function here on calling example returns text now 1 of the important thing note that I had been thinking too much about what certain in the chatter today all the responses we get our text they're not actually Jason on our Jason objects with the new system work and that's being worked on but for what we're doing that the text is fine so this function returns text but I just create a simple are actions that exact sequel statement I did before they were joined on address and and think that the e-mails critical statement we executed and then we use the Jason stringified function call to turn it into a text and actually use a couple pretty arguments so it looks nice I think she worked for the output looks like
by having to deviate from the powerpoint pernicious really hard to
show this without actually running in plastic I want you to see that I'm really doing it it's not just smoke mirrors so this is
what the output looks like as I said at the text string but it's formatted like this not just in this particular case it's an array of Jason objects you see the in the open square is at the top this is also a member of the pickup wanted I just did but I just took a basic sequel statement using built-in PostScript object functionality and PLGA a spit it out in exactly the format I needed but this is a huge huge time-saver verbatim mapping see the contact on top here we can address the there's an e-mail here's the next contact address and e-mail and so on so it's almost a slight free work I love it so
now got got a way to get objects in the format we need them out of PostScript so the next question
is great we can these queries and we can get in the form that we needed where where we put on you have to build this with the still match right if we still have to do the data mapping talk about media so when we put on how we define or how we access some of that API should you earlier what we
actually are doing here is we're saving queries the database with views that have rules and the really nice thing about storing them is used is the catalog and validated and easy access from any single consul you just run selects star from these views and see what's going on with those things we
define them with our adjacent mapping structure and that's the tables and relationships in certain rules and like the client the well values that it can be extended in a stored in a database registry
and here's what 1
looks like this is our contact mapping so at the top it's going the context of its tuple the namespaces is like the class mean space and the type which is the actual class itself is contact it maps to the contact table that's another step that special to us on his right from
privileges this is a really big deal for us we have something complicated security enforcement that just does not map directly to tables and all but we can map it here and this is
the this is the guts of it really is
governed have properties so I can map for each property in the JavaScript Object that I'm looking for 2 a table names
so here's us a stick something obvious the 1st name of contact it's going to be a string is gonna map to the field contact person or gets really interesting is down below here the sum to 1 relationship so the the ones where I want to actually call some other data types as an object so the sequel will be written like I showed you earlier using that table is type to get me that thing is an object so that 1 is defined as a to 1 and then
there's also some of here's the e-mail 1 to many and what happens is when you have these is jason definitions throughout some of our function calls it actually creates the there is a belong here so that the the question
is how to access the data simply we created a whole new set of functions in a class called xt recommends that those Jason files of the 1 I just showed you a creates the views I was talking about and then there's fetch function so that I can inspect the the properties of an object relational mapping and then I've got a good idea that has that mirrors that kind API was talking about so I can make a request to retrieve records from record in fact just like the class for and what happens is you know just passes these things through to PostScript so here's what that looks
like an action and then I'm going
to run over here the same thing that was in the presentation and with this is is is is I retrieve RB Tree record all notices being called as basically with a
regular sequel statement and this is the
output so that's the full output of my contact object based on the on that I just map that I just showed you here's the address is the e-mails you
can do that such statements is
that I was talking about earlier is us uh that that that that stimulus and Motorola is gives you kind musical style green and this is our interface to post 1st to get that kind of grain so I'm calling a function called xt fetch a pass at the record types and parameters conditions role it's and what not some other options and on and on and last year I like the
presenter several of will have
this posted up on the web so you
guys like really study a little more closely at the chart OK so this is my 1st statement right I wanted our 1st name equal to j or a last name starting with F and I get a big
old results of against an array starts with the races and I get several context that match the result so this is your ice now I have an interface that looks like something of and work with because of its that much
of a script on the post side and
this is really a colossal bonuses which is that we can take the adjacent balance that I just showed you and repeat these days and I am so for each of the objects that we want set up would pass them into this criteria that which is in the process to make their views and we also have a function that will generate the models for the client said to match so that a huge time-saver 1 definition those both the client and server side real excited about that and actually is
this question about service procedures sometimes what you just a regular basic object is enough you do something really complicated a specific white we will check the database to see if there's any records of already have this number or 1 of you some crazy Compaq speculation that can really only be done on the server side and all we want a posting voice which is a huge multistep transaction that has to be 1 compliant and transactions and so we've got this function called dispatch which is implemented to the class specific function
calls and the way that works is we have a point dispatchable classes we create a function call xt installed on script and it's a name space a class a context and in some kind of a script here what I'm doing is redefining and address object were saying that object is dispatchable means the client and call directly and and in in this particular case the function is I want a user can which is how many how many places is this address being used in the system and Marie so we have 12 hundred function in the database so we don't have time to rewrite all those right now so we can do is just Ratko saying that we already had an addressee's staff function using PLC equal on which is rapid in here and why gotta JavaScript exposure of the results of that function so if
I run it for long before this but
how many items system to step function NEC see how how it's called the type of the caller's dispatch a pass in the class name a pattern of functional 1 colony parameters and I get the result and the only thing about
this is that work so this is architecture I mean and have a
client running so we've got a
couple of static other pieces of that product or 1 is a serious part and the other is the villain part I can jump in this area and so what's
interesting about this is that he notices is running in browser zinc from I have an attacked you guys have your you're actually hopefully interested in some this the process talking about I suspect the no one's going to care about that the ultimate care about this this is that application written the browser that uses the additional 5 candidates so there's no doubt dissolving rendered but here the PC's graphics or my case the max graphics engine so I can see that all these different down and
it's we have sometimes a like about
tracker account circle like
companies and here's our context
right you can scroll through and
the neat thing about this is key
feels like and that about indices pretty snappy fear that's again that was 1 of several important things that needs to be snapping additional 5 lets us make a snappy out in a browser and this
also that is set to work on pattern so we're gonna be you back to the 1st ever hear about this outside of accessible only making more splashy announcement next week at the Open 1st Business Conference in San Francisco so you might hear more about this we're calling it no HTML when I went
back see also that the we just
made the code public yesterday so if you're interested in 1 talking about here you can go to get and everything that I was just showing you is in the database repository accessible database and then the other parts of data sources the pardon but that the client is the the web out after showing you and the bowl tools have acquired the together and then here's links to the other projects and this is probably out of date already right there she is that yeah that's that's a fast-moving project it was real valued jacket as well wait a minute I shape again that but it is to stabilize fairly stable solvers for happy with it's is just a great project notice here and if you said blossom it's here I think the poem be hearing more about blossom in the next few months the 1st company building an map on Blossom responses development so that's which upon hearing a lot about the next few weeks that's all I have and it's like a remains the time the short time what is idea of a couple for questions and and the tissue years starting now as in 11 OK would also found so any questions that I can't I can't answer so at the top of the island if you make a yes if you make a type that is the subset so that's a great question what we actually have is we've got a set of these these objects reviews of the full record and we have another set that's sort a partial view so there's xn addressed in the properties XM address info and that doesn't have everything and there are lots of cases we don't want the entire object heavy it has all the comments everything about it and maybe you just wanna browse lists you just want to see some of it exactly yes the info are designed not to have some sense of information they have less privileged restrictive the full the use of privilege restricted so you have to have full privileges to see the whole thing that's a great question and that the client supports lazy loading so there's there's 2 ways you can access and object 1 is defining is to 1 regular 4 2 1 next the States nested that means PostgreSQL return the whole object if you just say to 1 it's not nested just return the the key and in our client will actually asked for the rest of the data 1 needs so we have a lot of knobs we can treat their per performance issues that come up to decide whether to have discussed to the work of the crimes that were not a question working with this the fact that nobody's had before so there's no 1 to talk to you know 1 has nothing on the forums and I hope you know with this with the LDA going on P P. Jackson now he all start looking at this said some collective wisdom and knowledge building up and you will get some feedback on that a working a big working example project now on public that people can look at and critiquing please be is the kind of cultural find some people find things in a letter you but you know so that that's the main thing is that is a great thing to work with just have to figure out what the aim of the world yes we are 1st prototype was was from core which is HTML based on the trouble with HTML Don rendering is all the different browsers they're all real persnickety about the Don deal with it a little differently so it's really hard to make an app that works in all the browser well and you're drawing directly the candidature drawing pixel-by-pixel see again the same result and every browser and then the other really big thing which you cannot use it online tablet devices because most of them don't have the horsepower handle huge complicated non layout like we have done so the beauty of this is that it's it's designed to work on tablets work from my iPad and we're speed so I'm glad ready by Monday show but we have pieces ready for it to work on explorer 10 for Windows 8 and Mozilla and supports yes so this is what differentiates blossomed from sprout and blossom Valbonne based on what the author of blossom did and is he with the donkey are often replaced it with the cameras viewing so that's what makes Boston lost its proper with the cameras view so people know you don't have the latest and greatest glycosidic explorer 10 way from I I know this would be a non-starter for all company's doing sort of public customer-facing things but remember we're for making an application right and and it's no big deal for us to tell prospective customers users but the I have always Ingrid browser and so it's not for everybody but eventually these technologies will be ubiquitous anyway so in the long run it won't matter and that is then of website is there for you and so this is an area that i didn't program at all I didn't write it in the notes part of my my coworkers that and but why do you about it is its so forgiving you know our current C + + applications if there's any kind of interruption in the connection you're done you're dead you lose whatever you're doing just says we connect Urbina log out and start over so WebSockets you can lose the connection comeback animal it'll pick up where it left off so it's it's pretty nice was on the table Wheel of were using the stable version of node and all and all the packages it has been stable for us this is only the right and we aren't even in beta stage our goal is to have a beta in the next few weeks so we'll be doing a lot of testing load testing and and strongly user testing the next few weeks but so far so good 1 of the of the at this version is not set up to do that we know we can and it's sort of an hour long term nice-to-have plans the 1st things 1st here is gonna thereafter reconstructed in this environment but yeah absolutely that's something we were very interested in is off line of the force of will nice thing is not to be minimal because right using this this JavaScript API and the idea blossoms slash Spock or is this the the data store can connect to to a variety of data sources so we could just have it basically switch from the LOD data source to an offline 1 that runs the media sequel like database or whatever and just think up later so especially in our sites but not for while the about the age of the quality of that book all of it that's the whole it already has strong baggage everything in Boston is used as well as I do have you could theoretically grounded in something like web gap in 1 of the original goal was to actually build compile as a native app I'm not sure if we're going to get to that of pull that off but it is theoretically that should work but this just again there's so many things to do noise so much time but you have at the Cairo blossom really wants to do that you must have made of compel that's too bad and then the really easy to port and Web gap in fact even an iPad if I just say the link to hold it opens up just like that because there's no such thing rather all but we also know that in the case files right so that's largely a
design issue we've tried to
design this in way so it will fit on a variety of form factors even a phone and the easiest not have to be 0 so you can use CSS but we mostly
trying to cover by designing things in a modular way so that form factors that really relevant logic can get on the so like this tiles it's it's kind of plan a page the windows playbook this is tricky because
and I have all the normal screen
space that would have here the resolution but it can get to the have I came into this stroller
at the bottom which this your farm back the problem where would doing work on an area but the idea you can scroll entails over on a new details of transferred as many industry Nietzsche can as it can the device and then you just all of them that is the work of the areas of research areas in the use of the knowledge of the of the position of the columns of the history of 1 my current project is quarter million lines of C + + and probably in equal amount of sequel Maria about 150 thousand so far as I know that is going to save the lines of code 1 1 but I think the levels of abstraction and encapsulation is way way better so that it ought to be much easier to add on to this infrastructure than the current 1 we have just because it's object-oriented easier not necessarily less lines so I'm just using text editors and you know you can really have a script and eclipse and all that that was my has he sees them as text mining from richer for that so I mentioned in the just know that that there's a package called vows and X is known Jasmine the reason balanced and that is based on the behavioral BDD behavioral design his design development that any way you can get is we're gonna we're running out of these data models through valves within a few weeks we've got a couple test run to this is we 1 on all of our all of our data models through that thousand of efficiency basically build the test and it just goes through and runs in a pushes the data through looks for expected results and and shows you what Feldman should be pretty quick so that runs on the node death part we right and there's laser writing tests reduce the views and everything to your clients haven't got that yet but were fast approaching the point but it should I be them without but most of the of the of the of the of the of the of the the thank you to all the usual here with the local when I like about this is sound the year then there is that later built and PLGA that creates the queries and it was kind of thing about this is whenever I have a problem with the queries not working that well I just go changes in that 1 how there were other defined at 1 place and they all kind of the fixed were in our current system we decide we've been doing something wrong we have effects in the thousand places so so the nice thing is that if the centralized power and it's easy to fix the and a lot of you just have to put careful thought into the design of your and like I said he had the different streams you can go to you 1 load everything is 1 giant object or just pieces of it and in ways we will the rest of the objects is a design decisions you have to make depending on what you're trying to do work on performance feedback you're getting to actually run it all yet yeah but the idea is you have to write any simple right you have places sequels and those dispatch functions and even those I would like to rewrite them so they just use organs themselves and not signals you have to do or there's a lot of testing that alright it's completely non translatable we have to rebuild everything but I will say this is the thing that blows away the most is this is way faster than a simple of of way which is strange rest we've always been kind of C + + begins with the induced yeah this is 1 way to write a real program that occur at the MIT and faster and that's for us to finish building rebuilding framework the best possible we think people public and start complaining why is your older but capsule so that it's the and the client this has the data source level object models in the data store so it captures a lot more than our current client does not say is unlikely it's also just hyper like this said this thing started apple innocent pretty smart abolition of so it's it's pretty highly tuned out of the box you may also OK will use that and this was true in the
Feedback