But as it should, it’s only working inside the template. … & even without an element as in the code above. I am very happy to report that ‘click’ is working on ‘div’ or ‘p’, … 'click div' increment the counter when button is clicked Here it is:Įvents/Helpers: import from 'meteor/reactive-var' $('#client').The code was too obvious so I didn’t add it. Nice we needed also to initialize select2 elements and it worked nicely. select2-search input",function(e), options).fetch() We needed to add event handle on body element with filter. We found out that this is an issue with Select2 cause it does not have callback function for this, and beside this it stops propagating all keypress events. First we needed to find out how to populate select2 based on search text typed in it. We choosed Select2 component, cause it looks nice in Bootstrap. Cause we want to link exact document with exact document. So we need a picklist like select and not some input with typeahead functionality. You have to call the method on server, that eventually will return proper data at some point in time. you cannot simply query for data, cause queries are ASYNCHRONOUS on client. In simple words, how to pickup from other collections and link it properly. But no! Queries from same collections are merged on client, so you have to query for proper data AGAIN on client! Ok, we got this solved.īut then it comes the real problem, how to enter data and relate it to other documents. If you think like sql programmer, you would think ok, I published this query and here is the data. You certainly dont want to publish the entire customer collection to clients and filter it on client side. For example, a lowercase 'a' will be reported as 65 by keydown and keyup, but as 97 by keypress.An uppercase 'A' is reported as 65 by all events. The keydown and keyup events provide a code indicating which key is pressed, while keypress indicates which character was entered. If you display the collection in start page in browsing table, and then the same collection, but filtered in edit form, you have to publish the collection twice. The keyup event is fired when a key is released. So when opening the form the app has to do filtering related data collections based on currently opened document. When you select from any of these collections you need to have some kind of filtering and fetch on demand facilities.įirst we created a form with basic data and adding a related documents table in the form. In business app you typically have large collections like clients, invoices, and others. Again we checked many applications, but they mostly work with simple data entry, with small collections. Next step was creating a form to edit data. So we will try so stick with Keep It Simple Desing / KISD. First we tried to go in full featured admin template design, but then we realised that we are loosing time with design features that do not add user advantage over simplicistic design. I has simple paging and filtering data facilities. Ok, we tried many packages and solutions, and then we developed our own solution. My opinion is, if you do not understand the code you are using for business app, you are searching for problems. Some packages on are having bugs, and are not working properly, some are developed with noncompatible ui frameworks, and some are simply overcomplicated to add custom funcionality. It turned out that there are over 20 solutions for this problem, but neither one suited our purpose, a simple table browsing with paging and filtering data. Now you have over 1000 packages that you can reuse, and the important part, they are source coded and stored on Github. So we needed a table-browse package, and we started to look at packages. Preprogramed solutions that you can embed in your project. When we first started with Meteor, around version 3.5 i think, there was no facility like that is a repository of meteor packages. Ok we need also other facilities like reporting, charting and others, but for start we focus on browse, edit and link.įor start we needed a browse facilities. In business app we need a way to browse data (tables), enter data (forms) and link data. So beside setting Meteor environment (linux platform) we try to create all the requirements for real business app. But mainstream goes this way so we dont have many options to choose. I don't know if this is a step forward or step backward. It was hard (for me) to adopt notepad style programming, when once we had gui visual development environment with integrated debugger. Modern developer is lost in myriads of technologies like jquery, bootstrap, backbone, handlebars, reactive single page applications, and so on. We are heavilly in Meteor developement (javascript framework) developing a sample apps for testing how framework works in real business environments.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |