-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathnotes.txt
More file actions
579 lines (497 loc) · 21.6 KB
/
Copy pathnotes.txt
File metadata and controls
579 lines (497 loc) · 21.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
Scratch
=======
GUI - Vue Conversion
--------------------
Scenarios
☑ OrderDashboard
☑ Flex Fields
☑ Testing and using live server for data?
☑ Server submits (Test and real).
☑ Mockup LSN Dashboard - With Routing support/option?
CRUD for definition GUI - Custom Fields.
Docs for basic CRUD UI.
CRUDGUITester updates.
☑ Localization/preferences.
Implement Dashboard? Where? MES and child projects?
Theme - Dynamic See https://forum.primefaces.org/viewtopic.php?f=110&t=65497&p=188847&hilit=theme#p188847
Define Component in eframe and use in mes-core.
☑ Security - /flexType/index controller method enforces initial permissions/re-direct for login.
Samples.
Gradle tasks: build client files. make client library.
Remove old tests, pages, markers, widgets, .js files and adocs.
☑ Create/Edit/List GUI Tests
Remove webix module/docs.
Review BaseGUISpec for webix logic.
Look at global package install for DomainService, PageHolder?: https://forum.vuejs.org/t/best-way-to-instantiate-a-global-library-in-vue/115085/2 for
Document CRUD/Service logic.
Tasks
-----
Needs store hierarchy. See: https://medium.com/3yourmind/large-scale-vuex-application-structures-651e44863e2f
Patterns: https://learn-vuejs.github.io/vue-patterns/patterns/
Move boilerplate to common area (Standard Header?)
Define Gradle tasks
buildClient
testClient
Publish npm module for each eframe/mes module?
Determine how much of eframe/app definitions can be automatically pulled into the client-side components/app:
Field Order
Field Size/type
Labels/I18n.
How is this info passed to components. (new layer efInputText? or REST API to get page definitions.)
Re-use .css? Using an import?
Build way to package/serve client modules (from dist folder?, as-is or adjusted?). Multiple module support.
chunk.vendors
pages/module/index.js + .vue files (compiled).
Document developer setup, running, building and testing procedures.
Document guidelines
file naming convention (index.html everywhere?)
How is doc for components defined (e.g. Javadoc equivalent).
How to use common client-side features (e.g. Ajax)?
Define Dashboard Requirements
Configurable buttons? Maybe just string pre-defined activities together?
Remove all to..localized() methods and docs.
Publish Lib:
Consider:
Storing re-useable comps in src/eframe-lib/components...
Copy to node_modules with gradle task.
https://dev.to/shubhadip/vue-3-component-library-2le8
Test install at C:\Users\mph\Documents\tmp\vue3\vue3-component-library-master\dist\esm
npm run build
npm run build:js // Creates \dist\esm See Readme/md for how to import.
X https://cli.vuejs.org/guide/build-targets.html#library
X https://snipcart.com/blog/vue-js-plugin Tutorial
☑ Make Library: https://github.com/team-innovation/vue-sfc-rollup
sfc-init - Creates mostly empty project.
npm i
npm run serve
To Build/install in client (after changes):
npm build
npm pack
npm i C:\Users\mph\Documents\tmp\vue3\sfc-rollup\sfc-lib\sfc-lib-1.0.0.tgz
`
Resources/Notes
---------------
Tutorial: https://v3.vuejs.org/guide/instance.html
CLI/Pages: https://cli.vuejs.org/config/#pages
Chrome plugin (v3-beta): https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg
Mustache syntax can't be used in attributes. Won't work: value='{{ message }}'. Needs v-bind:value='message'
Ajax Lib: https://cdn.jsdelivr.net/npm/axios@0.12.0/dist/axios.min.js
Best Practices: https://www.telerik.com/blogs/10-good-practices-building-maintaining-large-vuejs-projects
Web Pack analyzer: https://www.npmjs.com/package/webpack-bundle-analyzer
Code generation: Empty dashboard?
Doc/Guide Notes/Conventions
---------------------------
The main vue component is stored as window.$page. Available globally. Set in root component's created()
Use reduced syntax standards: http://es6-features.org/#reduced
MVP
---
Defect Tracking
Yield Reporting - Configurable at oper/workType?
Assembly
Data Entry
Work Instructions
Routing/LSN Support in Dashboard UIs/Reports.
Multi-tenant
Mobile UI.
API Docs with 'Try it' option.
Monitoring Dashboard.
Onboarding new customer automation.
Website.
UI Branding and Look/feel stds.
Questions
---------
Need some sort of way to force product for order. Config by user?
Need way replace dialog contents for Defect Code selection.
No default dashboard found. Maybe add link on error message to run demoData?
Enum need varying in DB? All limited length fields need varchar()? Maybe length too short?
TaskMenu - Refresh with dev mode?
How are keys defined in domains? fieldOrder then keys.
No fieldOrder, find by key on CRUDRest does a 'find by null()'.
Keys has field name that does not exist, gives ugly message.
Add Getting Started section to Domains/GUIS/Controllers/Services.
Template/Getting Started with Domains?
TaskMenu without folder disappears.
GUI with single field.
Add option on get
Custom Field Rework
--------------------
Tasks
=====
Add API for adding value to fields. Supports tracking options.
x Test with tracking and Rest API updates?
x Update docs for mes-core, assy with API custom examples.
x Dirty Map ready for saving.
x FieldHolderMap - put() marks as dirty. Has Text ready for saving. Dirty= changedSinceLastJsonSerialize.
x new method put(name,value,CustomFieldConfig).
REST API - Disable _config export/import by default. Some mechanism to enable it on get?
Add URI with UUID for the get responses? (e.g. _uri: http.../UUID).
Check on update of fields. Should add to the list?
Test update of fields in GUI preserves older custom field values.
Archive works - full history preserved.
FieldHolderMap - Prevent storing unsupported types?
Option to force Flex Type/DE/FE field definitions before collection?
CustomFieldConfig - interface
CustomFieldTracking tracking - enum
format - FieldFormat - null if type can be inferred from JSON (String, Number/DigDecimal, Boolean).
Fix adocs to match impl: fieldExtension.adoc:184 history/type/config example.
Add fix for undetected missed update. See https://github.com/micronaut-projects/micronaut-data/issues/299
Add validation on Custom Field creation that prevents save if the name matches a core field. Do in FieldExtension?
Domain/POGO:
Test Scenarios
Round-trip - Update with value only history.
Round-trip - Update with value details history.
Round-trip - With config change (no history to full history).
Data Entry
==========
Always allow data to be logged via API without setup.
Define DE fields to be collected at specific places/events against order/LSN.
What triggers are needed? Through events back to dashboard? Similar to scan events?
Need required field on DEField.
Required at DE Level too? Collect at Start/Complete, etc feature?
Need common field definition handling for FlexField, FieldExtension, DEField.
Required flag in FlexField, FieldExtension, DEField.
Enforced at collection.
Trigger collection at:
Dashboard button press 1.0
After scan. Later Release?
After start/complete. Later Release?
Can disable check to avoid performance hit.
How is collection configured?
In Dashboard Editor?
At routing operation?
Link with dedicated columns or JSON structure.
Flag to trace all values collected (Latest Value Only, All Values, All Data (Who/what/when/where).
Events:
Pre/Post Start/Complete/Done
For (Order, Product, Routing/Oper, WorkCenter, WorkType) - Multiples.
Add to Traveller and Order History Reports.
Use Flex Type setup is for prompting? or Just copy field properties to DEField?
Link To objects (Order, Product, Routing/Oper, WorkCenter, WorkType). Needs to support future W/I, tools,etc.
Primary display is for a single link. Can be switched to list mode if needed.
Always stored in another table.
DE
DEField
DELink (Order,Product...) as id? or ask key field only?
Tasks
=====
ENH: Look at ArchUnit: https://www.archunit.org/ (uses bytecode).
ISSUE: API: Look at just sending fields jsonb as sub-JSON instead of naming conventions and special logic.
ISSUE: Support in non-CRUD endpoint with Domain as part of request.
ISSUE: JSON Mapper ignores invalid fields on input (non-CRUD endpoint).
PERF: Child save (DomainEntityHelper.childRecordUpdated() calls) forces parent to search engine.
Possible performance issue with multiple saves. Needs some sort of queue with coalescing logic to reduce updates to Search Engine.
ISSUE: Exception in Freemarker always comes back as 400 response. Need real message and real exception.
ISSUE: $$('defectData').setValue(uuid) - Displays the UUID, not the display value?
ISSUE: Create Flex Type with duplicate FlexType - Error displayed, but not on create screen any more.
ISSUE: Add tk.setComboValue(uuid) for the config type field. ReadOnly and not readOnly()
ISSUE: Domain Ref as readOnly show the UUID. Needs to display the short string.
ENH: Auto create order if not exists? In Jackson, or controller? Client question? MDE? or Flag in client with button to create?
ISSUE: Sort order in findDefects conflict with sorting. If an order is passed in for filter criteria, then it is overwritten by the sorting 'order=asc' parameter.
ISSUE: <@efField> is still using the controller's model name in textField and similar places. Needs to detect this case and
not grab the model from the modelAndView in non-definition GUI scenarios. Force the user to use the modleName="..." option.
DOC: Search all docs?
DOC: ASCIIDoc TOC on left, collapse all but current. 2.0 HTML generation into separate pages.
Joint server-side/client side sample.
Top-Level Guide Entries
How to Create a new Module.
Doc answers these questions:
How to display a dialog?
How to build a list in a dashboard?
How to popup dialog to edit/add record? Pass uuid into server-side
ENH: Icon to clear messages on top.
ISSUE: JS displayDialog button labels as 'Yes' shows as 'Yes.label'.
ISSUE: Release Product with routing and LSNs does not create LSN_OPER_STATE from GUI.
ISSUE: Action Log report not receiving order when run from .jar file. (Parameter is ordr).
SECURITY: Move all o.s.eframe.test to separate .jar file. Include test hooks for:
request user fallback (all fallbacks).
Look at mes-assy Assemble Dialog use of buttons. The .ftl file does not define the Ok/Cancel button logic.
Look at Large BOM/Defect list affect on basic read/update of Order. Cascade updates.
FileList field format.
Multiples.
Generic table of list.
Abstract storage.
Archive binary or reference to could location.
Vue vs. Dashboard
-----------------
https://www.mindk.com/blog/react-vs-vue/
Dashboard
---------
con - Config nightmare.
con - setup
con - developer learning curve
pro - Very dynamic
Vue Composition
---------------
pro - Mostly markup and custom components (e.g. LogDefect UI).
con - npm/Typescript hurdles (one time hit ?)
con - Static flow in dashboard.
pro - complex layout/features possible.
Buefy - Bad Key tabbing in calendar.
Bootstrap Vue- Ok, but not enough components. No editable drop-down.
Prime more themes
Need to include calendar localization data.
Element UI - Looks good, good updates. https://element.eleme.io/#/en-US/component/menu
Vuetify - Odd keyboard in calendar. Has summary on frameworks.
Quasar Bad keys for calendar. Has splitter.
Comparison:
https://vuetifyjs.com/en/introduction/why-vuetify#comparison-to-other-frameworks
Splitter:
https://vuejsexamples.com/a-vue-js-simple-and-touch-ready-panes-splitter-resizer/ -- Good.
The big issue is the dynamic needs of a dashboard. Vue seems to handle this poorly.
You can send dynamic HTML/Vue using the render function of the component definition.
This can retrieve the content and build it each time is is rendered, but it is very cumbersome. Must
build a virtual DOM for each element. Probably means parsing HTML in javascript (ugh).
Alternative: Use the template option on the component definition. This works, but the definition is fixed now.
We would need pass data values to it somehow. The normal v-model doesn't seem to work.
Alternative2: Pass down the HTML for the component once, with data elements. Not sure how
to get them into the v-model.
Scan Dashboard - Input field for use with phone keyboard.
Traveller report shows M1001 not current order.
Call generateExtensionDoc (e.g. generateExtensionDocAll) in main .gradle and in gradle.yml
Taskmenu refresh logic.
Part of page?
Does not see Dashboard records in production when demoData loaded later. Maybe add TaskMenuHelper.clearCache() to be called from demoData,
Maybe add timer to TaskMenuHelper caching.
First time Error:
15:45:23.946 [io-executor-thread-1] ERROR client.status - {"stack":"TypeError: Cannot read property '$count' of undefined\n at u.open (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:54:3610)\n at Object._taskMenuToggle (http://localhost:8080/assets/eframe_toolkit-3dc5bcb2d6177a3b65bacfddb98b8320.js:35:389)\n at eval (eval at v (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:10:561), <anonymous>:1:4)\n at eval (<anonymous>)\n at v (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:10:561)\n at Object.<anonymous> (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:18:838)\n at Object.callEvent (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:10:2053)\n at y (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:10:2695)\n at HTMLBodyElement.<anonymous> (http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js:19:365)","message":"Cannot read property '$count' of undefined","name":"TypeError","logData":{"msg":"Uncaught Exception","errorMsg":"Uncaught TypeError: Cannot read property '$count' of undefined","url":"http://localhost:8080/assets/webix.min-8552d835cbf5b3abaf68708dafab6317.js","line number":54,"column":3610}} ip=/172.17.0.1:42348
Groovy extension GUI with hooks?
Ask question updating suggest on Webix forums.
Check out JaCoCo https://www.jacoco.org/jacoco/trunk/doc/ and gradle plugin.
Figure out automatic shift to upper case on input. Which fields? Toggle?
Support JWT as Authorization header with std OAuth access token support.
Globals - Theme?
Fix mess with efForm.dashboard. Support type='dashboard', 'buttonHolder' and 'dialog'.
Consider moving to use of status UNAUTHORIZED vs. FORBIDDEN.
Issue 672 Still broken. Update project ref-issue to 2.1.3 and verify that it is still broken.
Add workaround for update failure: 299. Remove sop.
Version and opt locking (custom JDBCOperations).
Cascading updates. Find some way to prevent? - isDirty or save() option?
Is Repository findByUuid() and findAll() needed? Use CrudRepository.findById() and .findAll()?
Support cache in specific use cases:
UserPreferences - timed, any update for user flushed cache? done in PreferenceHolder?
FieldExtension/GUI - Already cached at the domainUtils level with FieldGUIExtension via ExtensibleFieldHelper
Others as needed.
Support for MPE?
Check Search in CrudGUITester and add to definition list logic/controller.
Look into Jackson skipping foreign references. Only need key and ID fields to import.
Simplify Client.javascript to one per Controller by default - Add GUI test of logging level in EFrameJSLoggingGUISpec.
Add E2E test for optimistic locking detection. In definition GUIs.
Reports
Test in MES app.
Bugs:
Definition List boolean checkbox not centered.
Definition List key field allows HTML un-escaped in it.
Show Page with name="<script>alert('bad')</script>" fails with Javascript syntax error in SampleParent.
Edit/Create? page save failures. Fixing problem and re-saving value gives error (Invalid UUID string: null)
Look at using https://github.com/apps/whitesource-bolt-for-github for CVE library scanning.
Others: https://dzone.com/articles/8-free-security-tools-every-developer-should-know
Reports
Still an issue? Can't reproduce in simple query. Fix issue with date ranges error by TZ offset?
Multi-tenant
------------
Unique DB for each customer running under one server.
Master DB that defines all tenants for a given DB/server cluster.
Defines connection info for all tenants - encrypted.
Connection pool created upon startup or on demand with flyway triggered? Consider Liquibase instead?
Liquibase - Module support?
resources/db/mes-assy/V1.0.0.sql
Request always has tenant ID in URL as sub-domain: https://acme.simplemes.org/
Replacement for Micronaut-Data required.
Provide a connection pool for each tenant.
Connection pool wrapped with security to limit access to other pools.
Immutable while request is being processed.
Use Hikari Pool.
Convert from Netty to Jetty to simplify run-time environment.
Module/addition is on master toggle in JVM. Secondary check on tenant.
Dynamic execution based on tenant.
Custom fields defined in DB. Re-loaded for each tenant. Cached distributed cache.
Need isolated archive storage by tenant.
Need JWT to encode tenant in JWT/Refresh tokens?
Create new tenant with single push button:
Creates new DB in server.
Sets up sub-domain.
Support move of tenant: DB move with some config move. May be slow.
Main Tasks - Multi-tenancy
--------------------------
Replace MN Data - Use JTA and HikariCP
Convert to Jetty
Archive Storage
Sub-domain support.
MES Demo Release Requirements
-----------------------------
Reports
WIP
Task Before MES work
Dashboards/Questions from nested code
Addition modules
Global Toggles?
Themes - Including fixes to 'TBD: Needs different value for theme.' notes.
Periodic Archiving
UI
Old Notes
==========
Setup
----------
GIT server
cd /opt/git/smes
mkdir eframe.git
cd eframe.git
git init --bare
MN Create
cd smes
mn create-app eframe -l groovy -f spock,hibernate-gorm,management
IDEA
New Project from Existing Sources (default for all)
Import Gradle.
Remove second-level eframe module in IDEA.
Edit build.gradle (import sources).
Move Application.groovy to correct package.
GIT Setup
cd eframe
git init
git remote add origin mphouston@s:/opt/git/smes/eframe.git
git clone ssh://mphouston@s:/opt/git/smes/eframe.git
Added master section to .git/config
Make Module for Distr.
=====================
Delete from .jar
Application.class
logback.xml
UI
==
UI Toolkit Module (two flavors: JQX and HTML).
Notes on Micronaut investigation
Key Missing Features
====================
Persistence - CRUD and ad-hoc
Txn
Foreign Keys
Message Broker (with Saga/undo support)
Custom Fields
Client Asset delivery/gzip/etc
UI Layer - tags?
Modules (e.g. plugins)
Key Decisions
=============
Persistence
UI
Single mini-service or multiple? UI inside service?
Graal is not supported with Hibernate now. Ignore Graal for now.
Modules
=======
eframe (library) only
org.simplemes.eframe.*
/opt/git/mmes/eframe.git
mes-core
mes-assy
mes (appl)
Module JAR Support
==================
compile "org.simplemes:eframe"
Provides:
Controllers
Views
Security Providers
Domains
Dependencies:
compile "io.micronaut:micronaut-security-jwt"
Package structure
=================
Option 1 org.simplemes.eframe
application (startup and common pages "/")
controller
domain
service
auth
controller
domain
controller
custom
controller
domain
domain
auth
controller
domain
misc
system
test
web
request
view
builder
widget
std layout
----------
XYZ
controller
domain
service
page (GEB in test module)
views structure
===============
views
auth/loginAuth, denied
home/index
includes
header.hbs
src/assets
css
javascript
images
Groovy vs. Kotlin
=================
Groovy is clearer.
GORM vs. JPA vs. Kotlin Expose
UI Decision
===========
JQX or Other Toolkit?
Toolkit Module?
Webix Notes:
Look at https://snippet.webix.com/309867f6 for replacing sections of a page (e.g. dashboard) and form layout
Look at https://snippet.webix.com/5e25f570 for form layout.
https://snippet.webix.com/a674ca30 - Simulate a real login form.
Input fields have unique ID generated. Not easy to test. $('#field') vs. $('div', view_id: 'field').find('input'). Module?
Uses in Page: field { module(new InputFieldModule(id: 'field')) }
Forms can't be submitted like normal. Need JS code.
Consider white-listing function calls in dynamic pages?
Webix Dashboard Activity Example
================================
dash.y = function() {
console.log("y()")
};
_json = {
view: "button", value: "List", type: "form", click: "dash.y();", width: tk.width('33%')
};
Page Mockups
============
static content = {
startButton {module(new ButtonModule(id: 'start'))} //{ $('div', view_id: 'start').find('button')}
panelA { $('div', view_id: 'PanelA')}
panelB { $('div', view_id: 'PanelB')}
resizer { $('div', view_id: 'resizerA')}
//startButton { $('div', view_id: 'start')} // Works
//startButton { $('button')} // adding view_id takes extra 32ms to find element.
}
Needs
-----
Theme?
GEB Testable
Grid for inline editing.
Resizable columns
Sort order
Hide column
Table - Display only
Paging Support
Resizable columns
Sort order
Hide column
Tree
TaskMenu
Logging
Splitter
Dialog - Modal
Widgets
Date/Time
Single/Multi-select Combobox with completion
Replaceable content with logic.