va smalltalk update

Click here to load reader

Post on 20-May-2015

381 views

Category:

Technology

1 download

Embed Size (px)

TRANSCRIPT

  • 1. VA Smalltalk Update John OKeefe Principal Smalltalk ArchitectInstantiations, Inc.Copyright 2011, Instantiations, Inc.

2. Recent Events Completed first year as pure Smalltalk company # of users and revenues continue to grow Growing Engineering staff 4 engineers joined since ESUG 2010 Using contractors for additional capacityCopyright 2011, Instantiations, Inc. 3. Recent Events Continued University Outreach Hasso Plattner Institute Bachelor Project GTK+ Bindings for Linux Interested in more User Outreach Conference participation ESUG, Smalltalk Solutions, Smalltalks VA Smalltalk Forum -> VA Smalltalk Google Group Aggregated on [Smalltalk] http://forum.world.st Previous forum content still available (static) New Videos and Podcasts pages on websiteCopyright 2011, Instantiations, Inc. 4. Previous Releases V8.0 (May 2009) Seaside, Tabbed Browsers, Documentation delivery system V8.0.1 (November 2009) Seaside update, cdecl calling convention V8.0.2 (May 2010) Seaside update, GLORP V8.0.3 (February 2011) Seaside update, GUI improvements, added documentationCopyright 2011, Instantiations, Inc. 5. VA Smalltalk V8.5 August 2011 Development Tools Code Assist (code completion) Infrastructure Logging Framework Preference Settings Framework Deprecation Exception Graphics and Windowing Rebar Control TIFF CCITT T.4 bi-level encoding Web Interface Grease 1.0.5+ / Seaside 3.0.5+ HTTP Chunked Transfer EncodingCopyright 2011, Instantiations, Inc. 6. Development Tools Code Assist Problem: Developers can create many moreclasses and methods than we can hold names forin our minds Solution: Use the computers calculatingcapabilities to predict names as they are beingentered in the code editorCopyright 2011, Instantiations, Inc. 7. Development Tools Code AssistGeneral and extensible content assist frameworkCustomizable popup list displays actionable suggestionsLayout management functions control popup placementAPIs and Extension Points allow for customizationNumerous Configuration OptionsEnable and configure auto-popup of completionsuggestionsVisibility settings (i.e. Show only Public methodsuggestions) or to accept completion suggestionsAutomatic completion if single available suggestionCopyright 2011, Instantiations, Inc. 8. Development Tools Code Assist Context-Sensitive Auto-CompletionSupported in Browsers, Workspaces and Debuggers Suggestions for Methods, Symbols/Atoms, and Variables Uses parse tree analysis and type reconstruction toprovide most relevant suggestions Smart Suggestion Sorting Variable Suggestions: Locals before pseudo variablesbefore pool variablesMethod Suggestions: Public before Private Class Suggestions: Classes that extend SubApplicationafter other classesCopyright 2011, Instantiations, Inc. 9. Development Tools Code AssistSuggestion descriptions provide additional detailsMethods: Class in which the method is defined orcommon superclassScoped Pool Variables: Value of the pool variableUnscoped Pool Variables: Pool Dictionary in which it isdefinedSuggestions offered for ambiguous receiversOrderedCollection new add: #(1 2) be Does the user want to complete before: for the receiver: #(1 2)? Does the user want to complete add:before: for the receiver: OrderedCollection new? Only the user knows; both suggestions are offeredCopyright 2011, Instantiations, Inc. 10. Development Tools Code Assist Parentheses auto-inserted for methodcompletions Method override suggestions Requesting Code Assistance at the top of a code browserwill offer methods available to be overridden Arguments are automatically inserted upon completionof an overridden methodCopyright 2011, Instantiations, Inc. 11. DemoCopyright 2011, Instantiations, Inc. 12. Infrastructure Logging Framework Problem: The product currently contains manyone-off logging solutions, but no centralizedfacility useable by product developers andcustomers. Solution: Provide a Logging Framework tostandardize the definition, use, and outputformats of logging.Copyright 2011, Instantiations, Inc. 13. Infrastructure Logging Framework Log4s is a port of the popular Java logging framework log4jCopyright 2011, Instantiations, Inc. 14. Infrastructure Logging Framework Example of application logging requirement A banking company is required to keep monthly logs ofall foreign transactions and weekly logs of all foreigntransactions greater than $10000Copyright 2011, Instantiations, Inc. 15. Infrastructure Logging Framework Example of application logging solution Make .ini file entries[log4s]createLogger=(vast)dailyRollingFileAppender=(ForeignTxns, root,c:logsforeignTxns.log, false, info,EsPatternLayout, %d [%c] %o, true, topOfMonth)dailyRollingFileAppender=(BigForeignTxns, vast,c:logsbigForeignTxns.log, false, warn,EsPatternLayout, %d %c %o, true, topOfWeek)The pattern of %d %c %o will log the time, the loggername, and the transaction object.Copyright 2011, Instantiations, Inc. 16. Infrastructure Logging Framework Define Transaction>>printLog4s^ String streamContent: [ :stream | stream nextPutAll: self payee; space; nextPutAll:self amount printString ] The application code might look like this:logIfNeeded: aTransaction aTransaction isForeign ifTrue: [EsLogManager info: Foreign txn object: aTransaction. "goes to root logger"aTransaction amount > 10000 ifTrue: [ EsLogManagerloggerNamed: vastwarn: Large Foreign txnobject: aTransaction ] ].Copyright 2011, Instantiations, Inc. 17. Infrastructure Logging Framework Result foreignTxns.log will have output like this: 28 Aug 2011 08:15:07,000 [root] Mark Twain 13.67 bigForeignTxns.log will have output like this: 28 Aug 2011 08:15:07,000 vast Fred Smith 23645.23Copyright 2011, Instantiations, Inc. 18. InfrastructurePreference Settings Framework Problem: Existing customization preferencesettings are not well-managed or well-documented. In some cases, they are completelyhidden. Solution: Provide a Preference SettingsFramework to standardize the management anddocumentation of preferences.Copyright 2011, Instantiations, Inc. 19. InfrastructurePreference Settings Framework Preferences are held in .ini file Major groupings are stanzas -- generally named thesame as the application they relate to keyword=value entries hold the settings Values are typed Simple: boolean, decimal, directory, file, fraction, integer, multiLineString, number, point, string Complex: array, rangeCopyright 2011, Instantiations, Inc. 20. InfrastructurePreference Settings Framework Preference settings are managed by subclasses ofApplication Preference settings are read from the .ini file The user implements 3 methods to providepreference settings for an application validSettings currentSettings setCurrentSettingsCopyright 2011, Instantiations, Inc. 21. InfrastructurePreference Settings Framework validSettings Provides valid element types for keywords withinstanzas ExamplevalidSettings^ LookupTable newat: self symbol asStringput: (LookupTable with: fplevel ->(0 inclusiveTo:9) elementType: self integerType));at: VAST 5.0 Compatibilityput: (LookupTable with: installPath -> selfdirectoryType);yourselfCopyright 2011, Instantiations, Inc. 22. InfrastructurePreference Settings Framework currentSettings Provides current and default setting values for keywordswithin stanzas ExamplecurrentSettings^ LookupTable new at: self symbol asStringput: (LookupTable with: bitmapPath -> (Arraywith: CgScreen bitmapPath with: #()));yourselfCopyright 2011, Instantiations, Inc. 23. InfrastructurePreference Settings Framework setCurrentSettings Transfers setting values to their used location for theapplication ExamplesetCurrentSettings| addr |addr := self settingFor: ServerAddress.addr isEmpty ifTrue: [ addr := nil ].EmLibrarydefaultName: (self settingFor: DefaultName);serverAddress: addr;openReadOnly: (self settingFor: OpenReadOnly)Copyright 2011, Instantiations, Inc. 24. Infrastructure Deprecation Exception Problem: Frameworks evolve and some APImethods are destined to be removed in favor ofreplacement methods, but customers may havecode dependencies. Solution: Mark methods as deprecated andgather usage informationCopyright 2011, Instantiations, Inc. 25. Infrastructure Deprecation Exception Technique Categorize method as Deprecated Replace method content with:self deprecated: explanation string in: version string.^ invocation of alternate implementation ExampleasDecimal ^ selfdeprecated: Replaced by #asScaledDecimalin: V8.5;asScaledDecimalCopyright 2011, Instantiations, Inc. 26. Infrastructure Deprecation Exception Deprecation is subclass of Warning Default handling based on preference Logging: write message to in-memory log Showing: write message to Transcript (TranscriptTTY inruntime) Raising: open MessagePrompter allowing continue orterminate Documentation provides sample code to dump in-memory logCopyright 2011, Instantiations, Inc. 27. Graphics and Windowing Rebar Control Problem: Windows customers want Toolbarswith adjustable content. Solution: Add support for Rebar controlCopyright 2011, Instantiations, Inc. 28. Graphics and Windowing Rebar Control Specialized container for widgets Holds bands Bands may be moved and resized Band may hold Gripper (for resizing) Child widget Label BitmapCopyright 2011, Instantiations, Inc. 29. Graphics and Windowing TIFF CCITT T.4 bi-level encoding Problem: Customers are receiving FAXdocuments encoded as CCITT T.4 that they cantprocess Solution: Add support for CCITT T.4 bi-levelencoding (read and write) to existing TIFFsupportCopyright 2011, Instantiations, Inc. 30. Web InterfaceSeaside 3.0.5+ / Grease 1.0.5+ Problem: Seaside and Grease development hasprogressed since VA Smalltalk V8.0.3 Solution: Port Seaside 3.0.5 and Grease 1.0.5(both with updates through 8/9/2011 exactlevel identified in configuration maps)Copyright 2011, Instantiations, Inc. 31. Web InterfaceHTTP Chunked Transfer Encoding P

View more