go to post Evgeny Shvarov · Apr 28 Thanks, Enrico! Namespace, of course! I prefer usualy the simplicity of having one Database in one Namespace if possible. Your great answer doesn't answer though my question. The situation is: I deploy a package, which contains: persistent class(es), data(generated ok, but could be different), WebApp (aka CSP app). I deploy a Role also, which will be used by the WebApp. Role need the access to database... Here is my question, which database resource do I provide to the role as I don't know the namespace the package will be installed by a potential user?
go to post Evgeny Shvarov · Apr 26 HI @Touggourt ! You can start e.g. from this template . So you can clone or use as a template this github repo. When IRIS starts in this it is prepared to work with Python in any supported modes. Here is the related article.
go to post Evgeny Shvarov · Apr 25 Thank you, @Ashok Kumar T ! Never used %WriteResponse() before. May I ask you to provide the full method? I shared the persistent class in the updated post.
go to post Evgeny Shvarov · Apr 24 "Let's remember this tweet" ;) I suggest we test the water in 6 month/one year. I believe all the frameworks(current or new AI-focused) will be a tool for AI to construct the frontend at least. Same for the backend. Or maybe we'll use "GPT Memory" concepts instead of relational/multi-model databases we used to work with.
go to post Evgeny Shvarov · Apr 17 Great article, @Timothy Leavitt ! I think it is questionable the recommendation not to use AI for the spheres you are not familiar with. E.g. I'm not a frontend developer at all but the AI capabilities in AI generation are awesome and give me an opportunity to immediately have an MVP in frontend and also to build prototypes fast which was impossible in a preAI times.
go to post Evgeny Shvarov · Apr 17 also, thanks to @Semion Makarov swagger ui app is updated to support Swagger 3.1 version. and functionality is improved greatly!
go to post Evgeny Shvarov · Apr 17 Great article! Thank you @Pablo Frigolett ! Also, if you develop in Docker there is an issue with server name, and my version of the same GetSpec method is: ClassMethod GetSpec() As %DynamicObject { Set spec = {}.%FromJSON(##class(%Dictionary.CompiledXData).%OpenId("dc.Sample.v2rest.spec||OpenAPI").Data) Set url = $Select(%request.Secure:"https",1:"http") _ "://"_$Get(%request.CgiEnvs("SERVER_NAME")) _ ":" _ $Get(%request.CgiEnvs("SERVER_PORT")) _ %request.Application Set spec.servers = [{"url" : (url)}] Quit spec } Thanks to @Lorenzo Scalese !
go to post Evgeny Shvarov · Apr 16 @Mario Sanchez Macias concluded the final most optimal option here.
go to post Evgeny Shvarov · Apr 12 How can we improve it - is to publish more "good" ObjectScript to Github and other open-source repositories and share best practices here :)
go to post Evgeny Shvarov · Apr 12 Hi @Anna Golitsyna ! I appreciate you watched the video. Indeed it (AI Copilot) is not that bad sometimes especially in simple cases and sometimes can even surprise like "reading thoughts" what to put next so VSCode+Copilot could be more effective in coding ObjectScript vs just Studio and occasional copy-paste from ChatGPT. But I agree with @Dmitry Maslennikov that the very fact that AI can "talk" ObjectScript/Mumps is mostly because of Open Exchange initiative and its impact on Github.com, where ObjectScript is listed as a recognizable language (thanks again to @Dmitry Maslennikov to his impact to it about 10 years ago).
go to post Evgeny Shvarov · Apr 8 Yes. But you cannot return String in this method - either dynamic object, or Stream object. BTW, I’d even expect this functionality over %JSON.Adapter, as there is an option to import (construct) persistent from dynamic in it: Set person=##class(dc.Sample.Person).%New() do person.%JSONImport(dynamicPerson) But person.%JSONExport() does JSON string into device. Would be wonderful to have: D person.%JSONExport(.dynobj)
go to post Evgeny Shvarov · Apr 8 Thank you so much, @Laura Blázquez García ! This is a great catch! This does the job! The only concern is that I'd love to see something like: set dynObj=$System.JSON.Persistent2Dynamic(person) Especially since VSCode highlights %Zen as a deprecated package. (Are there any plans? calling @Timothy Leavitt )
go to post Evgeny Shvarov · Apr 8 Wow, @Robert Cemper ! Thank you as usual! But 3 lines. Could it be a one command by any chance? :) I compete with the following: /// Get JSON for a person with a given id ClassMethod personsidGET(messageRequest As dc.Sample.v3rest.requests.personsidGET) As %Status { Set person = ##class(dc.Sample.Person).%OpenId(messageRequest.pathid) set stream=##class(%Stream.TmpCharacter).%New() d person.%JSONExportToStream(.stream) return stream } This works, but with an unnecessary "to stream, out of stream" exercise IMHO.
go to post Evgeny Shvarov · Apr 7 Looks very promising, but doesn't work for me: USER>set dynObj = {}.%FromJSON(person.%ToJSON()) SET dynObj = {}.%FromJSON(person.%ToJSON())^<METHOD DOES NOT EXIST> *%ToJSON,dc.Sample.PersonUSER>
go to post Evgeny Shvarov · Apr 7 %Zen is deprecated in 2025.1. but this method is still useful: set dynObj = ##class(%ZEN.Auxiliary.altJSONProvider).%ObjectToAET(obj) Are there any similar or "system" methods now to convert persistent instances into a dynamic object? @Eduard Lebedyuk @Timothy Leavitt